Use new backgrounds in wifi setup for xl
Bug: 3373467 Change-Id: Iccc9a4c36dc46a67e395c81a642646b8199be606
This commit is contained in:
@@ -136,6 +136,7 @@
|
||||
|
||||
<activity android:name=".wifi.WifiSettingsForSetupWizardXL"
|
||||
android:theme="@android:style/Theme.Holo.NoActionBar"
|
||||
android:windowBackground="@drawable/setups_bg_default"
|
||||
android:clearTaskOnLaunch="true"
|
||||
android:screenOrientation="landscape"
|
||||
android:exported="true" />
|
||||
|
BIN
res/drawable-hdpi/setups_bg_complete.png
Normal file
BIN
res/drawable-hdpi/setups_bg_complete.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 111 KiB |
BIN
res/drawable-hdpi/setups_bg_default.png
Normal file
BIN
res/drawable-hdpi/setups_bg_default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
BIN
res/drawable-hdpi/setups_bg_wifi.png
Normal file
BIN
res/drawable-hdpi/setups_bg_wifi.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 136 KiB |
BIN
res/drawable-mdpi/setups_bg_complete.png
Normal file
BIN
res/drawable-mdpi/setups_bg_complete.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
BIN
res/drawable-mdpi/setups_bg_default.png
Normal file
BIN
res/drawable-mdpi/setups_bg_default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
BIN
res/drawable-mdpi/setups_bg_wifi.png
Normal file
BIN
res/drawable-mdpi/setups_bg_wifi.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 104 KiB |
@@ -118,6 +118,8 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
||||
|
||||
private DetailedState mPreviousState = DetailedState.DISCONNECTED;
|
||||
|
||||
private int mBackgroundId = R.drawable.setups_bg_default;
|
||||
|
||||
// At first, we set "Skip" button disabled so that users won't press it soon after the screen
|
||||
// migration. The button is enabled after the wifi module returns some result
|
||||
// (a list of available network, etc.) One possible problem is that the notification from the
|
||||
@@ -261,6 +263,8 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
||||
// this can be false here. We want to treat it as "after connect action".
|
||||
mAfterConnectAction = true;
|
||||
|
||||
trySetBackground(R.drawable.setups_bg_complete);
|
||||
|
||||
mProgressBar.setIndeterminate(false);
|
||||
mProgressBar.setProgress(2);
|
||||
|
||||
@@ -376,6 +380,8 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
||||
edit = true;
|
||||
}
|
||||
|
||||
trySetBackground(R.drawable.setups_bg_default);
|
||||
|
||||
// We don't want to keep scanning Wi-Fi networks during users' configuring one network.
|
||||
mWifiSettings.pauseWifiScan();
|
||||
|
||||
@@ -432,6 +438,8 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
||||
/* package */ void onConnectButtonPressed() {
|
||||
mAfterConnectAction = true;
|
||||
|
||||
trySetBackground(R.drawable.setups_bg_wifi);
|
||||
|
||||
mWifiSettings.submit(mWifiConfig.getController());
|
||||
|
||||
// updateConnectionState() isn't called soon after the user's "connect" action,
|
||||
@@ -478,6 +486,8 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
||||
}
|
||||
|
||||
private void onBackButtonPressed() {
|
||||
trySetBackground(R.drawable.setups_bg_default);
|
||||
|
||||
if (mAfterConnectAction) {
|
||||
if (DEBUG) Log.d(TAG, "Back button pressed after connect action.");
|
||||
mAfterConnectAction = false;
|
||||
@@ -570,6 +580,8 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
||||
mConnectButton.setVisibility(View.VISIBLE);
|
||||
mConnectButton.setEnabled(true);
|
||||
|
||||
trySetBackground(R.drawable.setups_bg_default);
|
||||
|
||||
if (!TextUtils.isEmpty(mEditingTitle)) {
|
||||
mTitleView.setText(mEditingTitle);
|
||||
} else {
|
||||
@@ -637,4 +649,14 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
||||
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) {
|
||||
super.onCreateContextMenu(menu, view, menuInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace the current background with a new background whose id is resId if needed.
|
||||
*/
|
||||
private void trySetBackground(int resId) {
|
||||
if (mBackgroundId != resId) {
|
||||
getWindow().setBackgroundDrawable(getResources().getDrawable(resId));
|
||||
mBackgroundId = resId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user