diff options
-rw-r--r-- | AndroidManifest.xml | 1 | ||||
-rw-r--r-- | res/drawable-hdpi/setups_bg_complete.png | bin | 0 -> 113999 bytes | |||
-rw-r--r-- | res/drawable-hdpi/setups_bg_default.png | bin | 0 -> 53612 bytes | |||
-rw-r--r-- | res/drawable-hdpi/setups_bg_wifi.png | bin | 0 -> 139108 bytes | |||
-rw-r--r-- | res/drawable-mdpi/setups_bg_complete.png | bin | 0 -> 87387 bytes | |||
-rw-r--r-- | res/drawable-mdpi/setups_bg_default.png | bin | 0 -> 39306 bytes | |||
-rw-r--r-- | res/drawable-mdpi/setups_bg_wifi.png | bin | 0 -> 106925 bytes | |||
-rw-r--r-- | src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java | 22 |
8 files changed, 23 insertions, 0 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index b80b7b4..c7fbfa4 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -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" /> diff --git a/res/drawable-hdpi/setups_bg_complete.png b/res/drawable-hdpi/setups_bg_complete.png Binary files differnew file mode 100644 index 0000000..d922859 --- /dev/null +++ b/res/drawable-hdpi/setups_bg_complete.png diff --git a/res/drawable-hdpi/setups_bg_default.png b/res/drawable-hdpi/setups_bg_default.png Binary files differnew file mode 100644 index 0000000..5883b1d --- /dev/null +++ b/res/drawable-hdpi/setups_bg_default.png diff --git a/res/drawable-hdpi/setups_bg_wifi.png b/res/drawable-hdpi/setups_bg_wifi.png Binary files differnew file mode 100644 index 0000000..6b83d9b --- /dev/null +++ b/res/drawable-hdpi/setups_bg_wifi.png diff --git a/res/drawable-mdpi/setups_bg_complete.png b/res/drawable-mdpi/setups_bg_complete.png Binary files differnew file mode 100644 index 0000000..a0cd961 --- /dev/null +++ b/res/drawable-mdpi/setups_bg_complete.png diff --git a/res/drawable-mdpi/setups_bg_default.png b/res/drawable-mdpi/setups_bg_default.png Binary files differnew file mode 100644 index 0000000..f05bf96 --- /dev/null +++ b/res/drawable-mdpi/setups_bg_default.png diff --git a/res/drawable-mdpi/setups_bg_wifi.png b/res/drawable-mdpi/setups_bg_wifi.png Binary files differnew file mode 100644 index 0000000..4fa1619 --- /dev/null +++ b/res/drawable-mdpi/setups_bg_wifi.png diff --git a/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java b/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java index f4cafdf..476ba58 100644 --- a/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java +++ b/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java @@ -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; + } + } } |