漂亮的Android范围拖动选择条:Android Range Slider View
jopen
9年前
漂亮的Android范围拖动选择条:Android Range Slider View
特性
- Ripple effect on Android Lollipop devices
- Option to set custom colors for slider
- Option to set custom colors for slider height
用法
Add a dependency to yourbuild.gradle:
dependencies { compile 'com.chan.rsv:rsv:1.0.0' }
Add thecom.chan.rsv.RangeSliderViewto your layout XML file.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:rsv="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <com.chan.rsv.RangeSliderView android:id="@+id/rsv_small" android:layout_marginTop="50dp" android:layout_width="match_parent" android:layout_height="50dp" android:layout_marginLeft="30dp" android:layout_marginRight="30dp" rsv:filledColor="#1A5F77" /> <com.chan.rsv.RangeSliderView android:id="@+id/rsv_large" android:layout_marginTop="50dp" android:layout_width="match_parent" android:layout_height="100dp" android:layout_marginLeft="30dp" android:layout_marginRight="30dp" rsv:filledColor="#FF6600" /> </LinearLayout>