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