android-slider

Seekbar where I can change both min max value with 2 thumbs

≡放荡痞女 提交于 2020-11-29 09:11:00
问题 I want to have a thumb for both min and max for my seekbar. You should be able to drag both thumbs independently. 回答1: Just use the RangeSlider in Material Components and the method setValues() <com.google.android.material.slider.RangeSlider android:id="@+id/slider" android:valueFrom="0" android:valueTo="10" ../> with: RangeSlider slider = findViewById(R.id.slider); slider.setValues(1.0f,5.0f); You can also use: <com.google.android.material.slider.RangeSlider android:id="@+id/slider" android

Implementation of Google design guidelines for Sliders

眉间皱痕 提交于 2020-07-18 08:42:28
问题 Yesterday I was looking for sliders in Android and found this website with the Google search: https://material.io/guidelines/components/sliders.html#sliders-discrete-slider I know that I can use a SeekBar in Android to implement sliders. However, Google seems to have very nice examples of discrete sliders but I cannot find any code examples. I already implemented a normal SeekBar that is looking like this: How can I make it look like this? (Difference: When I move my slider, there is no big

Custom seekbar (thumb size, color and background)

假装没事ソ 提交于 2019-11-26 09:20:45
问题 I would like to have this seekbar in my Android project : This is my seekbar : <SeekBar android:id=\"@+id/seekBar_luminosite\" android:layout_width=\"@dimen/seekbar_width\" android:layout_height=\"@dimen/seekbar_height\" android:minHeight=\"15dp\" android:minWidth=\"15dp\" android:maxHeight=\"15dp\" android:maxWidth=\"15dp\" android:progress=\"@integer/luminosite_defaut\" android:progressDrawable=\"@drawable/custom_seekbar\" android:thumb=\"@drawable/custom_thumb\" /> This is my custom_thumb

Android - styling seek bar

倖福魔咒の 提交于 2019-11-26 01:36:49
问题 I wanted to style a seek bar which looks like the one in the image below. By using default seekbar I will get something like this: So what I need is to only change the color. I need no extra styles. Is there any straight forward approach to do this or should I build my custom drawable.? I tried building custom one, but I could not get the exact one as shown above. After using custom drawable, what I get is as shown below: If I need to build the custom one, then please suggest how to reduce