Set Wi-Fi DPP fragment icons.

1. set fragment icon for WifiDppChooseSavedWifiNetworkFragment
2. set fragment icon of success for WifiDppAddDeviceFragment

All Wi-Fi DPP fragment icons are VectorDrawable of instinct size
24dp draw on a 48dp canvas. Except for ic_devices_check_circle_green,
it's a LayerDrawable of different size. I dynamically change ImageView
layout width & height between these 2 different kind of drawable.

Bug: 122982132
Test: manual test
Change-Id: Idab8cd8b0798363e447da00dc6bc68a86498b8be
This commit is contained in:
Arc Wang
2019-01-24 15:19:23 +08:00
parent 9a87eab259
commit 4ab826ac5b
8 changed files with 68 additions and 7 deletions

View File

@@ -55,7 +55,7 @@ public class WifiDppAddDeviceFragment extends WifiDppQrCodeBaseFragment {
@Override
public void onConfiguratorSuccess(int code) {
// Update success UI.
mHeaderIcon.setImageResource(R.drawable.ic_check_circle_green);
setHeaderIconImageResource(R.drawable.ic_devices_check_circle_green);
mTitle.setText(R.string.wifi_dpp_wifi_shared_with_device);
mSummary.setVisibility(View.INVISIBLE);
mWifiApPictureView.setImageResource(R.drawable.wifi_dpp_success);
@@ -110,7 +110,7 @@ public class WifiDppAddDeviceFragment extends WifiDppQrCodeBaseFragment {
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mHeaderIcon.setImageResource(R.drawable.ic_devices_other_opaque_black);
setHeaderIconImageResource(R.drawable.ic_devices_other_opaque_black);
final WifiQrCode wifiQrCode = ((WifiDppConfiguratorActivity) getActivity())
.getWifiDppQrCode();