Added info about why Wi-Fi is required

Added a new optional textview to wifi settings, informing that wifi
is required during setup. For use on Nakasi 3G.

Bug: 7383934
Change-Id: I231472438e61ccddedc1e680a362f90738d64a2d
This commit is contained in:
Russell Brenner
2012-10-19 18:55:14 -07:00
parent d983e1d1a5
commit 56a166e9e3
3 changed files with 21 additions and 2 deletions

View File

@@ -74,6 +74,15 @@
android:background="@android:color/transparent"
android:orientation="vertical" >
<TextView
android:id="@+id/wifi_required_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="6dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/wifi_required_info_text"
android:visibility="gone" />
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"

View File

@@ -32,7 +32,7 @@
<string name="show_dev_on">You are now a developer!</string>
<!-- [CHAR LIMIT=NONE] Device Info screen. Okay we get it, stop pressing, you already have it on -->
<string name="show_dev_already">No need, you are already a developer.</string>
<!-- Category headings in left-pane header menu --> <skip />
<!-- Settings main menu category heading. Wireless and networks (Wi-Fi, Bluetooth, data usage...). [CHAR LIMIT=40] -->
<string name="header_category_wireless_networks">WIRELESS &amp; NETWORKS</string>
@@ -1319,6 +1319,8 @@
<string name="wifi_more">More</string>
<!-- Wi-Fi settings. wps menu title [CHAR LIMIT=25]-->
<string name="wifi_setup_wps">Automatic setup (WPS)</string>
<!-- Message informing that wifi is required during setup [CHAR LIMIT=NONE] -->
<string name="wifi_required_info_text">To complete setup, your tablet needs access to Wi-Fi. After setup, you can switch between mobile data and Wi-Fi.</string>
<!-- Dialog for Access Points --> <skip />
<!-- Label to show/hide advanced options -->

View File

@@ -152,6 +152,9 @@ public class WifiSettings extends SettingsPreferenceFragment
// this boolean extra shows a custom button that we can control
protected static final String EXTRA_SHOW_CUSTOM_BUTTON = "wifi_show_custom_button";
// show a text regarding data charges when wifi connection is required during setup wizard
protected static final String EXTRA_SHOW_WIFI_REQUIRED_INFO = "wifi_show_wifi_required_info";
// this boolean extra is set if we are being invoked by the Setup Wizard
private static final String EXTRA_IS_FIRST_RUN = "firstRun";
@@ -238,7 +241,8 @@ public class WifiSettings extends SettingsPreferenceFragment
});
}
if (getActivity().getIntent().getBooleanExtra(EXTRA_SHOW_CUSTOM_BUTTON, false)) {
Intent intent = getActivity().getIntent();
if (intent.getBooleanExtra(EXTRA_SHOW_CUSTOM_BUTTON, false)) {
view.findViewById(R.id.button_bar).setVisibility(View.VISIBLE);
view.findViewById(R.id.back_button).setVisibility(View.INVISIBLE);
view.findViewById(R.id.skip_button).setVisibility(View.INVISIBLE);
@@ -258,6 +262,10 @@ public class WifiSettings extends SettingsPreferenceFragment
});
}
if (intent.getBooleanExtra(EXTRA_SHOW_WIFI_REQUIRED_INFO, false)) {
view.findViewById(R.id.wifi_required_info).setVisibility(View.VISIBLE);
}
return view;
} else {
return super.onCreateView(inflater, container, savedInstanceState);