Hi Everyone
I'm new in android and i'd like to do a menu for an application.
I want to replicate the menu style of this game that has different section
http://i.giphy.com/l4Jz4PbvjJEZHZn8c.gif
I have 3 different xml layout that i want to show in my horizontal style menu capable of swiping from a layout to another.
I have heard i could use something called horizontal ListView but i don't really know how to use it.
How do i do?
try Sliding tab Layout. Its the same function just need to edit the codes for different design
I want to create some tabs on android but I do not know if this kind of tabs is possible to create on android. If they are possible can someone give me some link to a similar tutorial or example so I can take a look how to create such tabs in android.
Here is what I'm looking for:
I need to have 2 tabs left and right, and a logo in the center that is not clickable.
You can use my library on Github it allows you to create a custom tab layout and use it. So you can create a layout which contains both image and text, and then you can modify tab according to position.
I'm trying to create a custom actionBar with a different shape (not rectangular) as shown on the image below, does anyone knows point me on the right direction?
At this point, it is no longer an ActionBar. Something like that would be a custom View.
It is missing a number of key components of the ActionBar such as the application icon and back arrow, and is lacking all of an ActionBar's styling.
You can create a completely custom View class and use that, or make a reusable layout and include it wherever needed using an include tag.
my app is using using Sherlock action bar.
my designer gave me a new design.
the app logo need to be in the middle
2 action items to the left and 2 actionitems to the right of the logo
the app logo height is 1.5 the size of the actionbar (it suppose to be a little overflow)
is it possible to create a custom layout for the actionbar to implement this desing ?
or should i remove my actionbar and implement the design my own ?
if item #3 will be optional , does it changes your answers ?
Thanks
I'm sorry, but kick your designer in the...
He doesn't get Android at all and shouldn't design for Android. Either it's an ActionBar and then you should treat is as such and you (or your designer) should follow the common pattern on Android, or it is not.
If it is no ActionBar, please do not use an ActionBar (no matter which library) and create a custom design that deviates enough from an ActionBar so as not to confuse users!
Please forward your designer, and your manager to Android design patterns site at http://developer.android.com/design/patterns/actionbar.html . Also tell them that if they want Google to ever feature them, they pretty much have to adhere to these. With all failed use full screen layout and create a custom control on the top
I agree with other answers: that's not an action bar as defined by Android guidelines.
I'll just add that in case you can't go against the design decisions made (yeah, real-world projects sometimes suck and as a programmer you'll have to do what the client asks).
Go with your own implementation. I suggest simply creating a fragment with the appropriate listener interface (a common Android pattern, let the activity implement the interface, set the fragment's listener in onAttach).
If you want to implement this (and I pretty much agree with the other posters, that this is non-standard, and probably shouldn't be done).
You won't be able to create this style ActionBar with the standard APIs (or ActionBarSherlock for that matter) - since your UI is non-standard
You could create a RelativeLayout, with your icon in the center (centerInParent="true"). Then in the same layout, you could create a background, with width set to "fill_parent", and the height to 2/3 the size of your center icon (calculating this value in DP).
Then you can create ImageButtons for your 2 ActionItems to the left and to the right, then just put them in your layout relative to the center icon.
Bottom line, you probably should re-think your UI, to make this more standard to the design patterns specified by Android. If you still want to do it the way your designer asks, you will need to do a custom layout (using a RelativeLayout as I suggested is one way to accomplish the UI you are looking for).
You could create a RelativeLayout, with your icon in the center
centerInParent="true"
Then in the same layout, you could create a background, with width set to fill_parent, and the height to 2/3 the size of your center icon (calculating this value in DP).
please how can I customize tabwidget to get a flat styled one with no dividers just like this one
You can set a custom appearance for your TabHost by calling TabSpec's setIndicator method with a custom view when you're setting up your tabs. The Google IO 2010 Scheduling app has some examples of this.
But for pete's sake, don't put your tabs at the bottom of the screen like these guys did. Don't treat your Android users like they're iPhone users, you're just insulting them.