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
Related
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.
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'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!
I am trying to make buttons of a similar nature to the buttons seen in the google+ app. Do you just declare these in XML like a regular button and just apply a custom style? Does anyone know generally what these buttons are and a sort of method for how to generate a look like this?
It can be anything that registered with a OnClickListener, something like: ImageButton, ImageView, a Layout w/ background image...
However, in my opinion, ImageButton is the best w/ some pre-defined functions for button-like effects/shapes.
an example can be found here http://code.google.com/p/iosched/
I am doing application for multimedia. At present i am concentrating on volume control. Is there any possibilities to change the style of progress bar into volume control. (IE) it should be looks like VLC volume control. pls guide me.
I don't exactly know what you want..
If you want a custom look of your ProgressBar need a custom progressDrawable.
<ProgressBar
...
android:progressDrawable="#drawable/progressbar_drawable" />
The easiest way would be to modify the original drawable in your SDK path (look for progressbar_horizontal.xml).
I don't think so. The volume control is a system app, so it's not part of your app. Maybe you could intercept the "volume up" button, but I'm not sure this is possible.