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
Related
I saw this when I first started and opened my emulator and wanted to include something like in my application.
Does anyone know how you implement this tutorial? Do you basically have a layout file with a TextView, ImageView, and a Button? And inflate it with some kind of dialog fragment? Is there a way to account for the transparency as well?
I experimented with a dialog fragment but mine looks nothing like the screenshot above. (no transparency, position at center, etc...)
I have never used it so I can not give you a code example. However it is documented in the Help Section of the developer documentation.
This library can help you too.
http://tinypic.com/r/2v85soh/5
Hi!,
Do you see that bottom arrow pointing up? I want to allow users in Android to be able to drag it and use buttons from there!
Regards,
Michael
Android has a SlidingDrawer UI component that can be used for this sort of thing: http://developer.android.com/reference/android/widget/SlidingDrawer.html
Android has a SlidingDrawer widget, but it's deprecated. I would look online for open source libraries/projects that have implemented this kind of functionality. Perhaps something like this: AndroidSlideUpPanel
I have googled this, most of the solutions are using:
1.TabHost with customized style which would cover the separate line between each tab to archive the requirement.
2.On the android developers website, there is a article is using Merge layout to put 2 buttons on top of the background image kind of archive what I want.(http://developer.android.com/resources/articles/layout-tricks-merge.html)
3.What about using button but style the looking like the example below? I don't need the selection, cause each item in the menu will be a button, which takes the user to another page.
I am wondering is there any other solutions apart from these two?
This is something want:
I don't need the menu likes a tab which has selected and unselected, they are better like a button always displaying in certain screen(activity).
Thank you.
You can use simple buttons, and provide any custom background for it. For such simple form as on your screenshot look for this link.
But #Janne write right thing - you should be very careful with transplanting controls from another platforms.
Im learning android layouts and Ive noticed a particular button widget in some android apps that I would like to add to my own apps, Im just not entirely sure what its called, In some cases this button widget even will include a dropdown list here are a few examples of what Im talking about.
in the first image you will notice that the checkmark, the camera and the pencil are all sitting inside of the button widget i'm after, and in the youtube app you will notice the thumbs up, thumbs down and more buttons
That's ActionBar. Native support for 3.0+ devices, and some work to do in pre 3.0-devices. You can find example in new api 14 samples(called "ActionBarCompat").
Please see my answer here which gives some good links on how to implement the "dashboard" pattern, and use the "quickaction" bar. I think this should put you on the right path. Also there is a link on how to implement the "action bar."
EDIT: According to Mighter, if you use API 1.6 - 2.3 there should be official Google samples for this now. Please see this.
I'm trying to make a list that looks exactly like Sound setting in 2.3.4 as in this screenshot:
The problem is that I tried using TableRow and ended up like this:
------------------------------------------
Vibration >
------------------------------------------
Only when not in Silent Mode
------------------------------------------
instead of one large row as in the screenshot. What did I do wrong?
These inbuilt icons are nice (such as the ">" icon) - couldn't find on Google Image so I guess these icons are "inbuilt" in the Android OS. Is there any document we can refer about this? I'd like to use system text colours/background colours and these icons but don't know how to implement in the code.
This is a PreferenceActivity.
This link is good example of android preference. Using preference you don't need to make table layout and using detail button icon. Using preference this icon comes automatically.
The examples from this link and this link may help you.
it is Listview but it is customizable you have to make xml file which display this tow Textview and icon(in your words).
These inbuilt icons are nice (such as the ">" icon) - couldn't find on Google Image so I guess these icons are "inbuilt"
This is not a inbuilt icons but this is just image that set customarily.
Here are some links:
Official Developer Community
fentastic Sai geetha blog
josecgomez.com