Refine accessibility
This commit is contained in:
@@ -6,6 +6,7 @@ import android.view.ViewGroup
|
||||
import android.widget.ArrayAdapter
|
||||
import androidx.core.os.bundleOf
|
||||
import androidx.preference.EditTextPreferenceDialogFragmentCompat
|
||||
import be.mygod.vpnhotspot.R
|
||||
import be.mygod.vpnhotspot.widget.AlwaysAutoCompleteEditText
|
||||
|
||||
class AlwaysAutoCompleteEditTextPreferenceDialogFragment : EditTextPreferenceDialogFragmentCompat() {
|
||||
@@ -20,7 +21,10 @@ class AlwaysAutoCompleteEditTextPreferenceDialogFragment : EditTextPreferenceDia
|
||||
private lateinit var editText: AlwaysAutoCompleteEditText
|
||||
|
||||
override fun onCreateDialogView(context: Context) = super.onCreateDialogView(context).apply {
|
||||
editText = AlwaysAutoCompleteEditText(context).apply { id = android.R.id.edit }
|
||||
editText = AlwaysAutoCompleteEditText(context).apply {
|
||||
id = android.R.id.edit
|
||||
minHeight = resources.getDimensionPixelSize(R.dimen.touch_target_min)
|
||||
}
|
||||
val oldEditText = findViewById<View>(android.R.id.edit)!!
|
||||
val container = oldEditText.parent as ViewGroup
|
||||
container.removeView(oldEditText)
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
android:layout_width="300sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
@@ -67,9 +66,10 @@
|
||||
android:text="@string/wifi_security" />
|
||||
<Spinner
|
||||
android:id="@+id/security"
|
||||
style="@style/wifi_item_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/wifi_item_content"
|
||||
android:minHeight="@dimen/touch_target_min"
|
||||
android:prompt="@string/wifi_security" />
|
||||
</LinearLayout>
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
@@ -95,10 +95,11 @@
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<Switch
|
||||
android:id="@+id/auto_shutdown"
|
||||
style="@style/wifi_item_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dip"
|
||||
style="@style/wifi_item_label"
|
||||
android:minHeight="@dimen/touch_target_min"
|
||||
android:text="@string/wifi_hotspot_auto_off"/>
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/timeout_wrapper"
|
||||
@@ -131,9 +132,10 @@
|
||||
android:text="@string/wifi_hotspot_ap_band_title" />
|
||||
<Spinner
|
||||
android:id="@+id/band"
|
||||
style="@style/wifi_item_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/wifi_item_content"
|
||||
android:minHeight="@dimen/touch_target_min"
|
||||
android:prompt="@string/wifi_hotspot_ap_band_title" />
|
||||
</LinearLayout>
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
@@ -155,11 +157,12 @@
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<Switch
|
||||
android:id="@+id/hidden_ssid"
|
||||
style="@style/wifi_item_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dip"
|
||||
style="@style/wifi_item_label"
|
||||
android:text="@string/wifi_hidden_network"/>
|
||||
android:minHeight="@dimen/touch_target_min"
|
||||
android:text="@string/wifi_hidden_network" />
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/max_client_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
@@ -179,11 +182,12 @@
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<Switch
|
||||
android:id="@+id/client_user_control"
|
||||
style="@style/wifi_item_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dip"
|
||||
style="@style/wifi_item_label"
|
||||
android:text="@string/wifi_client_user_control"/>
|
||||
android:minHeight="@dimen/touch_target_min"
|
||||
android:text="@string/wifi_client_user_control" />
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/blocked_list_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:viewBindingIgnore="true">
|
||||
|
||||
<EditText
|
||||
android:id="@android:id/edit"
|
||||
android:layout_width="match_parent"
|
||||
@@ -12,10 +13,12 @@
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:hint="@null"
|
||||
android:inputType="number"
|
||||
android:imeOptions="flagNoExtractUi"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="number"
|
||||
android:minHeight="@dimen/touch_target_min"
|
||||
tools:text="12345678">
|
||||
<requestFocus/>
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
</FrameLayout>
|
||||
|
||||
@@ -12,5 +12,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:scrollbars="vertical"
|
||||
android:contentDescription="@string/title_clients"
|
||||
tools:listitem="@layout/listitem_client"/>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
@@ -56,6 +56,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:minHeight="@dimen/touch_target_min"
|
||||
android:contentDescription="@string/donations__google_android_market_text"
|
||||
android:prompt="@string/donations__google_android_market_text" />
|
||||
|
||||
<Button
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="touch_target_min">48dp</dimen>
|
||||
<dimen name="listitem_manage_tether_padding_start">56dp</dimen>
|
||||
<dimen name="qrcode_size">264dp</dimen>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user