Add more Wi-Fi DPP UI features.
1. Use ConstraintLayout to fix footer buttons at bottom 2. ScrollViews have all other UI components excepts footer buttons 3. Use style/SuwGlifButton for buttons 4. Fix scan fragment crash when rotating screen Bug: 118794978 Test: manual test Change-Id: I509b0156c4835c75da75fb7ac4c82f55a0b506a1
This commit is contained in:
@@ -64,6 +64,7 @@ public class WifiDppQrCodeScannerFragment extends WifiDppQrCodeBaseFragment impl
|
||||
|
||||
// Key for Bundle usage
|
||||
private static final String KEY_PUBLIC_URI = "key_public_uri";
|
||||
private static final String KEY_IS_CONFIGURATOR_MODE = "key_is_configurator_mode";
|
||||
|
||||
private QrCamera mCamera;
|
||||
private TextureView mTextureView;
|
||||
@@ -71,7 +72,7 @@ public class WifiDppQrCodeScannerFragment extends WifiDppQrCodeBaseFragment impl
|
||||
private TextView mErrorMessage;
|
||||
|
||||
/** true if the fragment working for configurator, false enrollee*/
|
||||
private final boolean mIsConfiguratorMode;
|
||||
private boolean mIsConfiguratorMode;
|
||||
|
||||
/** The SSID of the Wi-Fi network which the user specify to enroll */
|
||||
private String mSsid;
|
||||
@@ -79,6 +80,15 @@ public class WifiDppQrCodeScannerFragment extends WifiDppQrCodeBaseFragment impl
|
||||
/** QR code data scanned by camera */
|
||||
private WifiQrCode mWifiQrCode;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
mIsConfiguratorMode = savedInstanceState.getBoolean(KEY_IS_CONFIGURATOR_MODE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
if (mIsConfiguratorMode) {
|
||||
@@ -368,4 +378,11 @@ public class WifiDppQrCodeScannerFragment extends WifiDppQrCodeBaseFragment impl
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
outState.putBoolean(KEY_IS_CONFIGURATOR_MODE, mIsConfiguratorMode);
|
||||
|
||||
super.onSaveInstanceState(outState);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user