[android-developers] Multi-pane Layout best practice

2014-10-26 Thread Sergio Panico
Hi all,
i just need some clarification about the best way to design a multi-pane 
layout for my app.

More in datail, i'm just interesting in understand how is the better way to 
let the fragments communicate with their parent activity.

Accordingly to what described here
 http://developer.android.com/design/patterns/multi-pane-layouts.html 
http://developer.android.com/design/patterns/multi-pane-layouts.html and 
here http://developer.android.com/training/basics/fragments/fragment-ui.html, 
i've 
designed my UI with the following structure:
  - a main activity (let say: A_MAIN) 
  - a list fragment (F_LIST) and its related activity (A_LIST)
  - a detail fragment (F_DET) and its related activity (A_DET)
  - an edit fragment (F_EDIT) and its related activity (A_EDIT)

Moreover, each fragment
  - defines an interface (OnFragmentInteractionListener) to send the user 
action to its parent
  - participates to the the action bar with the supported actions

and the main activity (A_MAIN) implements the listener for all fragments 
and has the following layouts:
  - for smartphone (default), it contains only the F_LIST fragment. When an 
item of the list is selected, it starts the A_DET with the F_DET fragment 
for the selected item
  - for tablet (sw600dp), it contains the F_LIST and F_DET fragments. When 
an item of the list is selected, it refreshes the F_DET for the selected 
item

The issue is that the parent activity for F_DET could be both A_MAIN or 
A_DET hence, in the smartphone scenario, i've some difficulties to send the 
listener action to the A_MAIN because it is two levels back (F_DET - A_DET 
- A_MAIN)...

Where i'm wrong?

(To better clarify, i just want the same interaction behavior of gMail app 
when select an email...)

I wait for your help and advice.

Regards
Sergio

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Multi-pane Layout

2012-03-26 Thread Ralph Bergmann | the4thFloor.eu
Hi,


I want to know: how to design a multi pane layout with more than 2 panes?

I found examples with 2 panes. But how to design the layout when I wont
more panes (with different widths)?

Example:

Main pane a and pane b are visible. The user clicks on an entry on pane
b. Pane a goes off to the left and from right comes pane c in. Just as
in the email app.



Ralph

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Multi-pane Layout

2012-03-26 Thread Justin Anderson
My guess is that they are using fragments and just replacing fragment a
with fragment c... To make it look nice they add an animation to the
transition.  In other words, there are really only ever two panes at any
given time.

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Mon, Mar 26, 2012 at 6:43 PM, Ralph Bergmann | the4thFloor.eu 
ra...@the4thfloor.eu wrote:

 Hi,


 I want to know: how to design a multi pane layout with more than 2 panes?

 I found examples with 2 panes. But how to design the layout when I wont
 more panes (with different widths)?

 Example:

 Main pane a and pane b are visible. The user clicks on an entry on pane
 b. Pane a goes off to the left and from right comes pane c in. Just as
 in the email app.



 Ralph

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en