Best practices for creating android drawer - android

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.

Related

advanced Android menu

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

Android change layout by sliding left/right

I tried many times to create a layout that contain multiple layouts and switch between these layouts by sliding left or right like on WhatsApp or Facebook apps.
I have used some LinearLayout, TableLayout and ScrollView but I didn't found the way to achieve it.
Do you have any solution please ?
What do you want to do is a Material Design Sliding Tabs ? I implemented that functionality in my app following this guide
You probably want to use Androids ViewPager and set up your views as fragments, it has built in swipe gestures to transition through pages so should cover what you need.
Check out this example, it's also got a sample app you can download and test out:
http://developer.android.com/training/animation/screen-slide.html

Create Carousel Style ViewPager

I'm looking to try and implement this style pattern into my application:
http://www.androidpatterns.com/uap_pattern/carousel
But I am having trouble in finding an existing library or solution to it. Does anybody know of any libraries that I could use or how I would go about implementing this?
So far, Ive found this:
http://www.inter-fuser.com/2010/02/android-coverflow-widget-v2.html
but it isn't quite what I want as it would be nice if it was hosted inside of a ViewPager so I can have buttons etc inside the view.
You might try twoway-view, an implementation of an AdapterView (similar to ListView/GridView) that supports horizontal scrolling.
In this case, you'd use it more like a ListView rather than a ViewPager, so each element would be a separate item layout, rather than Fragment.
One example of where twoway-view is in use right now is the latest Firefox for Android nightly as discussed on the announcement post, which contains some screenshots of it in use:

Android interface : show form like the grouped listview style?

I'm building an App for Android that already exists for iOS. On iOS, we really like to use the listview grouped style to show details and forms. It is really useful to show details of objects that we don't know how much properties they have before loading it.
I know that Android doesn't have a similar tableview style. And I don't want to use a custom library to recreate it, because I don't want to force an iOS like interface to my Android's users.
But how would you create a consistent Android interface that show similar information? Do you have example for me?
First of all, your instinct to not force iOS style UI onto Android users is correct and I respect you for it.
Android's ListView is roughly the equivalent of iOS's UITableView. There are important differences. For instance, you should never use a ListView inside another scrollable container. If a ListView is in a particular layout, it should (usually) be the only scrollable component. If you want multiple ListViews in a layout, you probably don't want ListViews at all. You should instead use (vertical) LinearLayouts and add the items in order.
Cyril Mottier writes excellent posts on implementing custom behavior for Android's ListView.
If you want to display data in a list then you can use the ListView. Here is a great article about how to use it.

How to design a iPhone like menu/button in android at the bottom?

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.

Categories

Resources