New custom seekbar: more improvements

fix value txt being cutted when too long

allow to set a custom string to show instead of the
numeric value when value is defaultValue
This commit is contained in:
ezio84
2017-09-17 21:55:09 +08:00
committed by hungphan2001
parent bbd8f269b5
commit 8dc8247882
3 changed files with 16 additions and 6 deletions

View File

@@ -30,15 +30,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="44dp"
android:gravity="start|center_vertical"
android:gravity="center"
android:orientation="horizontal"
android:paddingEnd="12dp"
android:paddingTop="4dp"
android:paddingBottom="4dp">
<TextView
android:id="@+id/seekBarPrefValue"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:singleLine="true"
android:ellipsize="end"

View File

@@ -19,6 +19,7 @@
<attr name="interval" format="integer" />
<attr name="min" format="integer" />
<attr name="units" format="string|reference" />
<attr name="defaultText" format="string|reference" />
</declare-styleable>
<!-- Value to pass to callback when restore button is pressed -->