Updated Wi-Fi hotspot dialog to the Material Spec.

+ If there is scrolling then force the scrollbars to always appear.
+ Align contents of the dialog with the title.
+ Change "Network SSID" to "Network name".
+ Added wifi_* styles to other style xml files so that Wi-Fi hotspot dialogs are visible on tablets.
+ Move layout_width/height from res/layout/{wifi_dialog.xml, wifi_dialog_row.xml} from style into the xml file.

Bug: 17684359
Change-Id: I42fb69132d6ba0fb8d9853de6f5524f29e6b70b6
This commit is contained in:
PauloftheWest
2014-10-02 06:22:47 -07:00
parent 59d33dbd25
commit 6e26427e52
8 changed files with 308 additions and 52 deletions

View File

@@ -16,50 +16,54 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="300sp"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:fadeScrollbars="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dip"
android:orientation="vertical">
<LinearLayout android:id="@+id/info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item"
android:orientation="vertical" />
<LinearLayout android:id="@+id/type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item"
android:orientation="vertical"
android:visibility="gone">
<TextView
style="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:layout_marginTop="8dip"
android:text="@string/wifi_ssid" />
<EditText android:id="@+id/ssid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:singleLine="true"
android:hint="@string/wifi_ssid_hint"
android:inputType="textNoSuggestions"
android:maxLength="32" />
<TextView
style="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_label"
android:layout_marginTop="8dip"
android:text="@string/wifi_security" />
<Spinner android:id="@+id/security"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_content"
android:prompt="@string/wifi_security"
android:entries="@array/wifi_ap_security" />
</LinearLayout>
@@ -67,36 +71,38 @@
<LinearLayout android:id="@+id/fields"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item"
android:orientation="vertical"
android:visibility="gone">
<TextView
style="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dip"
style="@style/wifi_item_label"
android:layout_marginTop="8dip"
android:text="@string/wifi_password" />
<EditText android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_edit_content"
android:singleLine="true"
android:password="true"
android:maxLength="63"
android:imeOptions="flagForceAscii" />
<TextView android:id="@+id/hint"
style="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="12sp"
style="@style/wifi_item_label"
android:text="@string/credentials_password_too_short"
android:layout_marginTop="8dip"
android:layout_marginBottom="10sp"/>
<CheckBox android:id="@+id/show_password"
style="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/wifi_item_content"
android:text="@string/wifi_show_password" />
</LinearLayout>
</LinearLayout>