[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,9 +16,9 @@
|
||||
|
||||
package com.android.settings.wifi.dpp;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -27,10 +27,9 @@ import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SetupWizardUtils;
|
||||
import com.android.settings.core.InstrumentedActivity;
|
||||
|
||||
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||
|
||||
/**
|
||||
* To provision "this" device with specified Wi-Fi network.
|
||||
*
|
||||
@@ -51,26 +50,23 @@ public class WifiDppEnrolleeActivity extends InstrumentedActivity implements
|
||||
return SettingsEnums.SETTINGS_WIFI_DPP_ENROLLEE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) {
|
||||
resid = SetupWizardUtils.getTheme(getIntent());
|
||||
theme.applyStyle(R.style.SetupWizardPartnerResource, /* force */ true);
|
||||
super.onApplyThemeResource(theme, resid, first);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
if (WizardManagerHelper.isAnySetupWizard(getIntent())) {
|
||||
setTheme(R.style.LightTheme_SettingsBase_SetupWizard);
|
||||
}
|
||||
|
||||
setContentView(R.layout.wifi_dpp_activity);
|
||||
mFragmentManager = getSupportFragmentManager();
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
handleIntent(getIntent());
|
||||
}
|
||||
|
||||
ActionBar actionBar = getActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setElevation(0);
|
||||
actionBar.setDisplayShowTitleEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleIntent(Intent intent) {
|
||||
@@ -112,12 +108,6 @@ public class WifiDppEnrolleeActivity extends InstrumentedActivity implements
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onNavigateUp(){
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScanWifiDppSuccess(WifiQrCode wifiQrCode) {
|
||||
// Do nothing
|
||||
|
Reference in New Issue
Block a user