mirror of https://github.com/tasks/tasks
Use material slider in SeekBarDialog
parent
d5fb5452f3
commit
b1671e74fa
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.rey.material.widget.Slider xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/slider"
|
||||
style="@style/Material.Widget.Slider.Discrete"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:paddingEnd="@dimen/keyline_first"
|
||||
android:paddingLeft="@dimen/keyline_first"
|
||||
android:paddingRight="@dimen/keyline_first"
|
||||
android:paddingStart="@dimen/keyline_first"
|
||||
app:sl_discreteMode="true"
|
||||
app:sl_maxValue="100"
|
||||
app:sl_minValue="0"
|
||||
app:sl_stepValue="5"
|
||||
app:sl_travelAnimDuration="50" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@id/slider"
|
||||
android:paddingEnd="@dimen/keyline_first"
|
||||
android:paddingLeft="@dimen/keyline_first"
|
||||
android:paddingRight="@dimen/keyline_first"
|
||||
android:paddingStart="@dimen/keyline_first"
|
||||
android:paddingTop="5dp"
|
||||
android:text="0" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_below="@id/slider"
|
||||
android:paddingEnd="@dimen/keyline_first"
|
||||
android:paddingLeft="@dimen/keyline_first"
|
||||
android:paddingRight="@dimen/keyline_first"
|
||||
android:paddingStart="@dimen/keyline_first"
|
||||
android:paddingTop="5dp"
|
||||
android:text="100" />
|
||||
|
||||
</RelativeLayout>
|
@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:paddingBottom="@dimen/keyline_first"
|
||||
android:paddingTop="@dimen/keyline_first">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/min"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:paddingLeft="@dimen/keyline_first"
|
||||
android:paddingStart="@dimen/keyline_first" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/max"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:paddingEnd="@dimen/keyline_first"
|
||||
android:paddingRight="@dimen/keyline_first" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/min"
|
||||
android:layout_toLeftOf="@id/max"
|
||||
android:layout_toRightOf="@id/min"
|
||||
android:layout_toStartOf="@id/max"
|
||||
android:indeterminate="false" />
|
||||
|
||||
</RelativeLayout>
|
Loading…
Reference in New Issue