Hey Mark,

Thanks for the advice, its gotten me closer to the solution that I was
looking for.  I guess I was hoping or figured there would be an
interface to give a layout file to an ActionBar tab as opposed to
attaching and detaching the needed fragments in the listener.

Jason Prenger

On Feb 9, 10:51 am, Mark Murphy <[email protected]> wrote:
> On Thu, Feb 9, 2012 at 12:36 PM, Jason Prenger <[email protected]> 
> wrote:
> > but how do I have
> > more than one fragment in a tab?
>
> The same way you have more than one fragment anywhere else: put more
> than one in a container (e.g., two FrameLayouts in a LinearLayout).
>
> > I can convert the second layout to using tabs since its only contains
> > one fragment but I'm not sure how get the first layout into a single
> > tab.  Is that something that's allowed?
>
> Sure. An action bar tab is a button. It dictates nothing about what
> happens when a tab is clicked.
>
> Off the cuff, I'd have a LinearLayout with three FrameLayout children.
> When the first tab is chosen, load your three fragments in the three
> FrameLayouts. When the second tab is chosen, load your one fragment in
> one of the FrameLayouts and make the others have visibility of GONE.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training...At Your Office:http://commonsware.com/training

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

Reply via email to