Is it possible to create disabled part of SeekBar? In need to create such component.
The main problem is to disable part of my SeekBar with changing color of this disabled part.
I spend a few hours to find out how to do it but didn't find any relation in source code and documentation.
Related
I need to create a SeekBarPreference with 2 thumbs (min/max functionality).
There are very, very little resources to find on this - mostly just old broken libraries.
I'd like to implement my own. The backend functionality is not a problem - my problem is trying to create the xml widget. Initially I tried to overlay 2 SeekBars on top of eachother but it doesn't seem feasible as only one can be changed at a time.
I'm after direction/a set of steps to implement this RangeBar as there is quite a lot to take on.
Alternatively if there are any current libraries with 2-thumb widget, that are compatible with AndroidX, that would be appreciated.
Please refer below link :
https://github.com/syedowaisali/crystal-range-seekbar
Using this crystal range seekbar library you can modify the seekbar as per your requirements like single thumb or two thumbs and also modify the theme.
<com.crystal.crystalrangeseekbar.widgets.CrystalRangeSeekbar
android:id="#+id/PriceRangeSeekbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_10ssp"
app:bar_color="#dddddd"
app:bar_highlight_color="#color/colorPrimary"
app:corner_radius="1"
app:data_type="_integer"
app:left_thumb_color="#color/white"
app:left_thumb_image="#drawable/ic_thumb"
app:max_value="500"
app:min_value="50"
app:right_thumb_color="#color/white"
app:right_thumb_image="#drawable/ic_thumb"
app:steps="50" />
I want to make a seekbar like the one in the figure for a music player project I'm working on.
Searched everywhere could not find anything helpful, any help will be appreciated
I think it would be easier to implement with ProgressBar with a horizontal style and not SeekBar. I think the most simple way to implement it is to set the android:progressDrawable xml attribute with a drawable of the pattern above (white background and the bars - invisible).
I am looking for a custom component to design a circular remote control view like the image below with different button and background color.
Each button should be touchable with proper press effect. I did find a useful library with this I am able to create somewhat similar design but still there are lots of improvement required like Press effect/ Inner and outer circle padding radius etc. Please help me to find the better option for this.
I think tihs is your answer.
You can download here.
https://code.google.com/p/radial-menu-widget/
You could make your own class extending view. You will then be able to override onDraw() and draw whatever you want.
You could also use default android Button with a custom xml selector defined with a different image ressource for pressed/not pressed states.
I'm trying to make a widget which is a togglebutton like the ones in the android control widget (the quicksettings for wlan, bluetooth etc.).
Here's how it looks (#Control Widgets)
Does anyone know if this layout is contained in the android sdk or if not how I can make a layout just like that one?
I've already tried some things but I don't know how do to the stroke at the bottom.
Regarding to your issue I searched a little bit deeper.
See: https://developer.android.com/guide/topics/appwidgets/index.html
These are the classes which you can use with an appwidget to implement in your layout there is no such thing like a toggle button, but an imagebutton which I think us exactly what Google is using for the "toggle buttons". Take a closer look on the imagebutton :
https://developer.android.com/reference/android/widget/ImageButton.html
Then you will find out it's exactly what you are looking for.
By default, an ImageButton looks like a regularButton, with the standard button background that changes color during different button states. The image on the surface of the button is defined either by the android:src attribute in the XML element or by thesetImageResource(int) method.
I can't imagine that such a complex layout is possible just using clean xml...
Hope it helps now!
Is there anyway to implement something like a trackbar on android, so I can explicity specify the values and select it?
Well i recall there were some tutorials on how to add one to a preference activity, so it is certanly possible, other than that there is the seekbar component in the sdk. you can even drag it in layout with the GUI tool.
if you have seen the media player controls and other similar things that can be added that is also a possibility although i don't know if those can be modified.
see this for customizing the seek Bar:
seekBar
also this thing about vertical seekbar can be helpfull:
Vertical seekBar
What you are you looking for is the SeekBar
http://developer.android.com/reference/android/widget/SeekBar.html