Closed badeesindi closed 6 years ago
I'm not sure what you mean by "thump". What exactly are you trying to do?
I'm talking about the circle shaped object that changes ValueView and AlphaView when scrolled right or left. By default, I get 100% transparent AlphaView color unless I slide it to the other side for example. I'm trying to get 0% transparent color when I start the activity, then I get the option to increase the transparency.
in XML I tried to set the progress to 100 and 50 but nothing happened, I still get full transparency: The mover doesn't change its position.
<com.rarepebble.colorpicker.AlphaView
android:progress="50"
android:id="@+id/alphaView"
android:layout_width="match_parent"
android:layout_height="@dimen/sliderWidth"
android:layout_marginBottom="@dimen/margin"
/>
The positions of the circles are determined by the color that you set. If you want to start with a particular transparency, then set the color with that transparency with ColorPickerView.setColor
:
Or in the preferences.xml with defaultValue
:
The alpha view does not understand any XML configuration on its own. Only the ColorPickerView and the ColorPreference do anything with XML.
That worked just great. I had to make a few changes in my code. I appreciate your hardworking. Keep it up :)
Thank you for your helpful solution. I have a question regarding positioning the thump. I've inflated the view but I can't set the thump on 100. I tried xml: android:progress="100" but it didn't work. Can you please provide me with a solution?
Here's my code: