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
Related
I want to be able to create a menu of three buttons like the one in this link in Android Studio
https://play.google.com/store/apps/details?id=com.easy.pedometer.step.counter.handle
The 3 buttons in the third screen is called TabLayout.
Here is link to the official documentation:
https://developer.android.com/reference/android/support/design/widget/TabLayout
Maybe, you find the ui a little bit different but you can customize.
I'd like to use Drawer in my application that uses different views like TextView or multiple ListViews. I want to have similar Drawer like Gmail or Feedly apps:
However I couln't find any example of how to do this in code and XML layout. One of the problems is using multiple ListViews in ScrollView - should I use LinearLayout instead of them and style it to look and act like ListView? Also how do I handle click event on these various views?
Are there any good examples or best practises to look for when creating "rich" drawer?
On the usage of multiple listviews,yes use a layout and dividers(Views) and style them to look like a listview.Thats what the gmail app did.As for click events,you will handle them the same way you do on other activities,using the item id.
I'm trying to find some information on how to create a menu that looks like the top of the menu for chrome for Android. I have tried experimenting with implementing icons for Android 4.0, but no luck. Tried googeling, but the only thing i found was an answer that said icons can't be implemented when API >= 11.
How does Chrome do it then? It's made for devices that's 4.0+!
Use popup list window to achieve this. As you can add header and footer to any list, you can create one linear layout with back forward and star like options.. Add that view to the popup window.
Any ListView can be associated with HeaderViewListAdapter, using this you can attach seperate layouts as a header and or footer to your listViews.
As Vinodkumar said, you can also use ListPopupWindow with HeaderViewListAdapters.
In the Android reference: HeaderViewListAdapter and ListPopupWindow
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
Could anyone give me a tip on how to build a layout like in the following picture?
The application i'm working on has absolutely nothing to do with VoIP but I'm trying to build something like this. One fixed toolbar at the bottom, an interchangeable middle pane with listviews, scrollviews or other, and another toolbar at the top which would change depending on the button selected on the bottom bar.
Also, would it be possible and good practice to keep all of this within a single activity?
You should NOT build an interface like this. Don't use bottom bars! Don't use labelled back buttons on action views!
You should read the Android design guidelines and then work with tab views... and other stuff referenced there and build an Android app.
Also, would it be possible and good practice to keep all of this within a single activity?
-Yes for sure, and yes with a slight catch, depending on what you mean.
One approach would be to create your top and bottom bars inside their own XML. Then in your activity onCreate() inflate and add at the top and bottom of your Layout.
If the bottom bar will not change ever, then you could actually add that into the layouts you already have. If you do it that way, to handle the listeners you could create an Activity that contains just the bottom bar click listeners and then extend that with all of your other activities.
Since the top bar can change though you'll probably have to inflate and add the views to that at run time, that way you can react to what is going on to add / remove / present the appropriate views in the top bar.
Also just because it is somewhat of a pet peeve of mine:
When designing your bottom bar please seriously consider the fact that some devices have soft buttons directly underneath the touch screen. And they are rather close to the screen on some devices. Applications with a bottom bar that is not tall enough create an opportunity for the user to hit one of the system buttons instead of one of the bottom bar buttons as they are intending (or vice versa). Which from a users perspective I must say is VERY aggravating.
Do not use bottom bars. To give a more familiar UI, put all of those functions into the top bar. Start by looking at the source code for the ActionBarCompat project in your android sdk sample folder.
The Android developer site is a good place to start. See
UI Guide
I also agree with the poster who recommended against this specific layout. It seems to have been developed for an iPhone and shouldn't be used "as is".