From: Tobias Brunner Date: Wed, 4 Jul 2018 09:43:40 +0000 (+0200) Subject: android: Move hint from TextInputEditText to TextInputLayout X-Git-Tag: 5.7.0dr5~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b2363b367852199310744e5646d2a2f76b7d4308;p=thirdparty%2Fstrongswan.git android: Move hint from TextInputEditText to TextInputLayout This avoids a NullPointerException on Android 8 related to the optional Autofill functionality. The bug has been fixed in Android 8.1 [1] but there is no fix for Android 8. [1] https://issuetracker.google.com/issues/67675432 --- diff --git a/src/frontends/android/app/src/main/res/layout/profile_detail_view.xml b/src/frontends/android/app/src/main/res/layout/profile_detail_view.xml index 49a918f12e..3cf0b552d4 100644 --- a/src/frontends/android/app/src/main/res/layout/profile_detail_view.xml +++ b/src/frontends/android/app/src/main/res/layout/profile_detail_view.xml @@ -32,6 +32,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="6dp" + android:hint="@string/profile_gateway_label" app:helper_text="@string/profile_gateway_hint" > + android:inputType="textNoSuggestions" /> @@ -72,15 +72,15 @@ + android:layout_height="wrap_content" + android:hint="@string/profile_username_label" > + android:inputType="textNoSuggestions" /> @@ -89,6 +89,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="4dp" + android:hint="@string/profile_password_label" app:helper_text="@string/profile_password_hint" > + android:inputType="textPassword|textNoSuggestions" /> @@ -161,6 +161,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" + android:hint="@string/profile_name_label" app:helper_text="@string/profile_name_hint" > + android:completionThreshold="1" /> @@ -199,6 +199,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" + android:hint="@string/profile_remote_id_label" app:helper_text="@string/profile_remote_id_hint" > + android:completionThreshold="1" /> @@ -216,6 +216,7 @@ android:id="@+id/mtu_wrap" android:layout_width="match_parent" android:layout_height="wrap_content" + android:hint="@string/profile_mtu_label" app:helper_text="@string/profile_mtu_hint" > + android:inputType="number|textNoSuggestions" /> @@ -232,6 +232,7 @@ android:id="@+id/port_wrap" android:layout_width="match_parent" android:layout_height="wrap_content" + android:hint="@string/profile_port_label" app:helper_text="@string/profile_port_hint" > + android:inputType="number|textNoSuggestions" /> @@ -248,6 +248,7 @@ android:id="@+id/nat_keepalive_wrap" android:layout_width="match_parent" android:layout_height="wrap_content" + android:hint="@string/profile_nat_keepalive_label" app:helper_text="@string/profile_nat_keepalive_hint" > + android:inputType="number|textNoSuggestions" /> @@ -368,6 +368,7 @@ android:id="@+id/included_subnets_wrap" android:layout_width="match_parent" android:layout_height="wrap_content" + android:hint="@string/profile_included_subnets_label" app:helper_text="@string/profile_included_subnets_hint" > + android:inputType="textNoSuggestions" /> @@ -384,6 +384,7 @@ android:id="@+id/excluded_subnets_wrap" android:layout_width="match_parent" android:layout_height="wrap_content" + android:hint="@string/profile_excluded_subnets_label" app:helper_text="@string/profile_excluded_subnets_hint" > + android:inputType="textNoSuggestions" /> @@ -454,6 +454,7 @@ android:id="@+id/ike_proposal_wrap" android:layout_width="match_parent" android:layout_height="wrap_content" + android:hint="@string/profile_proposals_ike_label" app:helper_text="@string/profile_proposals_ike_hint" > + android:inputType="textNoSuggestions" /> @@ -470,6 +470,7 @@ android:id="@+id/esp_proposal_wrap" android:layout_width="match_parent" android:layout_height="wrap_content" + android:hint="@string/profile_proposals_esp_label" app:helper_text="@string/profile_proposals_esp_hint" > + android:inputType="textNoSuggestions" /> diff --git a/src/frontends/android/app/src/main/res/layout/profile_import_view.xml b/src/frontends/android/app/src/main/res/layout/profile_import_view.xml index cabfd2944d..8fba69f3ff 100644 --- a/src/frontends/android/app/src/main/res/layout/profile_import_view.xml +++ b/src/frontends/android/app/src/main/res/layout/profile_import_view.xml @@ -119,15 +119,15 @@ + android:layout_height="wrap_content" + android:hint="@string/profile_username_label" > + android:inputType="textNoSuggestions" /> @@ -136,6 +136,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="4dp" + android:hint="@string/profile_password_label" app:helper_text="@string/profile_password_hint" > + android:inputType="textPassword|textNoSuggestions" />