Android: Design Patterns for Action Bar/Options Menus on Multi-Pane Layouts -
from android best practices api guide: supporting tablets , handsets:
in cases, may have 1 apk support both phone , tablet. suppose on phone have
listfragmentshows list of contacts in activity a, ,detailsfragment opens in newactivity, activity b, when user selects contact.now on tablet, can take advantage of real estate combining 2
fragments single, multi-paneactivity, activity a.
consider application on phone, again. in activity a, options menu might provide "select all" or "sync contacts" action. long pressing items in list may provide options "edit" or "delete". in activity b, options menu can provide actions "edit", "delete", or "favorite" well.
how consolidate options on tablet, however? consolidate options menu items 1 giant menu (1) ? or discard activity b menu , let user rely on long-tapping items on left (2)? 1 other option modify details fragment add of actions details fragment (3).
according android design website, contacts app seems use combination of 1 , 3. take @ http://developer.android.com/design/patterns/multi-pane-layouts.html
so there recommended approach, or developer?
they can go in options menu (or, better yet, action bar), assuming there @ least 1 item selected in list in fragment a. if there scenarios fragment a's list empty or has no selection, story gets bit more complicated, b's action bar items presume existence of selection. ideally, not load fragment b activity until there selection, in case fragment b's action bar items not appear until valid.
that being said, having different layouts fragment b (your option #3) reasonable. skeptical worth "favorite" star toggle, but, again, didn't ask me... :-)
the 1 disagree option #2. how use options #1 or #3 (or blend) you.

Comments
Post a Comment