I need a horizontal group of two buttons. It should be, or at least look, native as I want my app to look completely native. I'm after the same style as the button group of the google maps app:
Does anybody know how I can achieve this?
What makes you believe those buttons are native? :)
Actually those controls are custom RadioButtons enclosed in a RadioGroup.
Regarding the native buttons... usually these buttons have a different look and feel on different Android versions. For example on Android 2.2 the predominant color is white/gray, on Android 4.0 is blue.
Related
I'm wondering about the different types of buttons available in android Lollipop. In Google's material design guidelines for buttons Google described the three different types of buttons available in API 21. The button, the flat button and the floating action button. I can't seem to find the documentation for the buttons (other than the regular). Does anyone know how to make use of the new button APIs?
Thanks,
26hmkk
There's no new API for the buttons. Material Design is a concept and can be realised using any API/framework (Android Gingerbread, HTML, Windows::Forms, etc.).
The flat button is a regular button with its elevation set to 0.
The floating action button is a regular button with its shape set to circle.
If you need a FloatingActionButton class or something like that, you should look for third party libraries.
I want to achieve the two tabs as below using titanium for android.
These are not the normal tabs, so how do I achieve them ?
Thanks !!
These seem to be buttons on a toolbar and not tabs.
As there is no support for Android toolbars in Titanium (I'm not sure if Android a thing called toolbar) you will have to fake it.
To get the same results on Android you would have to use regular createView and add background and different buttons in it. you will also have to make the buttons work.
Use two Buttons and a ViewFlipper that contains different ListViews.
custom tabgroup class working on android and iphone may be useful to you. See the screen shots for android and for iphone also.
By using css or jquery it's easy to bring this grouped buttons. But in android native application how to design a xml file to bring grouped buttons like this, without using tabWidget method (i.e)tab layout.
That's a segmented radio button. There are various solutions but this is a good one: https://github.com/makeramen/android-segmentedradiobutton
I'm trying to cope with some problem in finding good idea. I would like to make interesting menu like in games on Android (eg. ANngry Birds or here: http://www.youtube.com/watch?v=Q3g6SdTODY4) In this panda game I supose that first menu are simply 3 color buttons, but what about this sliding menu later with stages description - this same as in angry birds? Telling the truth I have got no idea what object it can be?
I will be glad if someone can tell me that. Or the best to give some tutorials about it. I cant google any.
Well, it seems that this sliding stage description is implemented with some simple layout placed to HorizontalScrollView and some animation applied to the buttons.
It can be your custom view provided with your translation animations and handling its visibility on the click of the default menu button (via onKeyDown()) on Android.
There are similar questions:
Custom options menu in Android
Android: customize application's menu (e.g background color)
i am looking to add a home screen to my app sort of like facebook app has with little icons and labels under them (Pictures, Chat, Wall, etd). I would like to go this route as opposed to adding bunch of tabs on top.
My question is how i can get it done with Android API? I know i could probably make these icons with labels within but perhaps there is a way to make it in a native way.
Thanks! :)
Use regular Button/ImageButtons, but with android:background="#null". If you want the icons to change while they're being pressed or selected, use StateList Drawables.
http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList
Have you considered looking at the Facebook API and SDK for Android? They also provide functionality to create Facebook style dialogs aswell. Read-up more about the Facebook SDK here
I would suggest using a RelativeLayout and defining the looks of the home screen in XML. I would use ImageButtons like mentioned by gngr44 and then make the text labels from TextViews. You can align them beneath the buttons in XML and RelativeLayout is probably best.
The Android Developers site has a lot of useful info to get started. Like this link: http://developer.android.com/guide/topics/ui/index.html