[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:
Arc Wang
2019-05-03 17:38:48 +08:00
parent 0d1dc2bd59
commit 8e3c49123d
24 changed files with 334 additions and 455 deletions

View File

@@ -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.net.Uri;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiInfo;
@@ -33,6 +33,7 @@ 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 java.util.List;
@@ -93,6 +94,13 @@ public class WifiDppConfiguratorActivity extends InstrumentedActivity implements
return SettingsEnums.SETTINGS_WIFI_DPP_CONFIGURATOR;
}
@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);
@@ -117,12 +125,6 @@ public class WifiDppConfiguratorActivity extends InstrumentedActivity implements
} else {
handleIntent(getIntent());
}
ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setElevation(0);
actionBar.setDisplayShowTitleEnabled(false);
}
}
private void handleIntent(Intent intent) {
@@ -321,14 +323,6 @@ public class WifiDppConfiguratorActivity extends InstrumentedActivity implements
return true;
}
@Override
public boolean onNavigateUp() {
if (!mFragmentManager.popBackStackImmediate()) {
finish();
}
return true;
}
@Override
public void onQrCodeGeneratorFragmentAddButtonClicked() {
showQrCodeScannerFragment(/* addToBackStack */ true);