[Wi-Fi DPP] Refine Wi-Fi DPP UI layouts with SUW library
1. Use GlifLayout in all fragments 2. Fragments use 32dp icon instead of 48 dp 3. Replace ScrollView & ProgressBar & Header & Footer of original layout with GlifLayout design 4. Remove ActionBar (no more back button on screen top) Bug: 129021867 Test: manual Change-Id: I2fda48cb7f7819b2c8dd85c10d39e1f187463bd8
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.android.settings.wifi.dpp;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
@@ -70,13 +69,6 @@ public class WifiDppQrCodeGeneratorFragment extends WifiDppQrCodeBaseFragment {
|
||||
} else {
|
||||
getActivity().setTitle(R.string.wifi_dpp_share_wifi);
|
||||
}
|
||||
|
||||
setHasOptionsMenu(true);
|
||||
final ActionBar actionBar = getActivity().getActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
actionBar.show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -116,13 +108,11 @@ public class WifiDppQrCodeGeneratorFragment extends WifiDppQrCodeBaseFragment {
|
||||
|
||||
mQrCodeView = view.findViewById(R.id.qrcode_view);
|
||||
|
||||
setHeaderIconImageResource(R.drawable.ic_qrcode_24dp);
|
||||
|
||||
final WifiNetworkConfig wifiNetworkConfig = getWifiNetworkConfigFromHostActivity();
|
||||
if (wifiNetworkConfig.isHotspot()) {
|
||||
mTitle.setText(R.string.wifi_dpp_share_hotspot);
|
||||
setHeaderTitle(R.string.wifi_dpp_share_hotspot);
|
||||
} else {
|
||||
mTitle.setText(R.string.wifi_dpp_share_wifi);
|
||||
setHeaderTitle(R.string.wifi_dpp_share_wifi);
|
||||
}
|
||||
|
||||
final String password = wifiNetworkConfig.getPreSharedKey();
|
||||
@@ -168,4 +158,9 @@ public class WifiDppQrCodeGeneratorFragment extends WifiDppQrCodeBaseFragment {
|
||||
|
||||
return wifiNetworkConfig;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isFooterAvailable() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user