Support autoclick secondary action (5/n)

Seekbar UI show complete on all of devices.

Bug: 146019277
Test: manual
Change-Id: I18227db46ba5040082b9a4a691ad8e5233e3e269
This commit is contained in:
ChenJean
2020-02-13 15:14:48 +08:00
parent 6a7b237801
commit fb85c52c32
3 changed files with 8 additions and 6 deletions

View File

@@ -31,12 +31,12 @@
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Widget.TextView" /> android:textAppearance="@android:style/TextAppearance.DeviceDefault.Widget.TextView" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical"> android:gravity="center_vertical">
<ImageView <ImageView
android:id="@+id/smaller" android:id="@+id/shorter"
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="48dp" android:layout_height="48dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
@@ -49,12 +49,13 @@
<SeekBar <SeekBar
android:id="@+id/autoclick_delay" android:id="@+id/autoclick_delay"
android:layout_width="260dp" android:layout_width="0dp"
android:layout_height="48dp" android:layout_height="48dp"
android:layout_weight="1"
android:contentDescription="@string/accessibility_autoclick_seekbar_desc" /> android:contentDescription="@string/accessibility_autoclick_seekbar_desc" />
<ImageView <ImageView
android:id="@+id/larger" android:id="@+id/longer"
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="48dp" android:layout_height="48dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"

View File

@@ -47,6 +47,7 @@
android:key="autoclick_custom_seekbar" android:key="autoclick_custom_seekbar"
android:layout="@layout/accessibility_autoclick_custom_seekbar" android:layout="@layout/accessibility_autoclick_custom_seekbar"
android:selectable="false" android:selectable="false"
android:visibility="gone"
settings:allowDividerBelow="true" settings:allowDividerBelow="true"
settings:controller="com.android.settings.accessibility.ToggleAutoclickCustomSeekbarController" /> settings:controller="com.android.settings.accessibility.ToggleAutoclickCustomSeekbarController" />

View File

@@ -138,12 +138,12 @@ public class ToggleAutoclickCustomSeekbarController extends BasePreferenceContro
mDelayLabel = preference.findViewById(R.id.current_label); mDelayLabel = preference.findViewById(R.id.current_label);
mDelayLabel.setText(delayTimeToString(delayMillis)); mDelayLabel.setText(delayTimeToString(delayMillis));
mShorter = preference.findViewById(R.id.smaller); mShorter = preference.findViewById(R.id.shorter);
mShorter.setOnClickListener(v -> { mShorter.setOnClickListener(v -> {
minusDelayByImageView(); minusDelayByImageView();
}); });
mLonger = preference.findViewById(R.id.larger); mLonger = preference.findViewById(R.id.longer);
mLonger.setOnClickListener(v -> { mLonger.setOnClickListener(v -> {
plusDelayByImageView(); plusDelayByImageView();
}); });