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/
Related
I have a section where user selects a gender.
It looks like this.
However, I want it to look like this.
I researched, but could not find the solution.
How can I get this design?
Thanks!
It would be very easy to do using ToggleButtons instead of RadioButtons. You could just use a compound drawable in the button label.
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!
good afternoon
How could I get a design like this in my android application?
http://s2.subirimagenes.com/otros/previo/thump_7851660img20120718wa0000.jpg
That is, divided into three areas with different background color to the background activity. And for example in the first zone instead of having these options has a TextView and edit text where you enter something.
How to make something like that image what kind of layout is more recomedable use? Linear, Relative ...
Thanks in advance
You could use a fragment layout and use fragments to get that layout
The best way is to use PreferenceScreen with three PreferenceSections.
I have seen this in several apps, and I was wondering if this is in the API. It basically looks like a speech bubble but it allows for internal layouts within it.
Thanks in advance!
It's a custom view... you can implement something like that easily or use this code:
http://code.google.com/p/simple-quickactions
By the way, in order to create a correct bubble you must use a 9patch image.
Looks like a PopupWindow
HI,
I'm trying to achieve a custom buttons . I'm wondering how I can achieve this with Android.
The result should look similar like this,
how I can make special shapes adjacent the problem it is because the image of each button must always be rectangle.
Thanks.
You can create custom backgrounds (shapes, colors, etc..) using xml drawables.
You should check out the documentation and the samples, like this one: