Change your activities to Fragments.  When you select an item in the
listview in your drawer layout use the fragment manager to show the
appropriate fragment.

Since Activity and Fragment lifecycles are so close to each other the
conversion process shouldn't be too bad.

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


On Thu, Dec 5, 2013 at 2:14 PM, xrd <xrdaw...@gmail.com> wrote:

> I posted this question to StackOverflow in the hopes of finding a pattern
> I could use to reuse my activities inside a drawerlayout:
>
>
> http://stackoverflow.com/questions/20393343/how-do-i-refactor-activities-into-a-drawerlayout
>
> I've gotten no responses, so I'm wondering if anyone has a recommendation
> to stop looking in this direction, and instead just pull all the code out
> of the other activities into the main activity with the drawerlayout. I was
> hoping to keep things in the existing structure (there is a lot of code I
> could be pulling in...), but perhaps the reality is I'll need to pull the
> code into a single activity rather than spread across many activities.
>
> Thanks in advance.
>
> Chris
>
> --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.

Reply via email to