Re: [android-developers] Master Detail Flow with Fragment or Activity

2016-06-06 Thread Amitai Rosenberg
OK. Thanks for your help!

On Monday, June 6, 2016 at 9:11:12 AM UTC+3, TreKing wrote:
>
>
> On Wed, Jun 1, 2016 at 12:17 AM, Amitai Rosenberg  > wrote:
>
>> I see. However, I am already using multiple fragments on the same 
>> Activity with the Navigation Drawer, like Google suggests.
>>
>
> I found it easier to navigate to new Activities that extend some 
> NavigationDrawerActivity base then having one uber-Activity that manages 
> *every 
> single fragment* from the navigation drawer. 
>
>>
>> One question though: I am trying to implement a shared content element 
>> transition from my main activity to the details activity. The problem is 
>> that the content on the first activity is inside a fragment, and calling an 
>> intent with a shared element transition to the details activity doesn't 
>> work.  (If I use a fragment for the details this is easier to do).
>>
>> Any ideas?
>>
>
> Sorry, haven't done enough with transitions to help here.
>
>
> -
> TreKing  - Chicago 
> transit tracking app for Android-powered devices
>

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/ec1d5aca-d414-40d2-bac7-f1d40ddb9a4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Master Detail Flow with Fragment or Activity

2016-06-06 Thread TreKing
On Wed, Jun 1, 2016 at 12:17 AM, Amitai Rosenberg 
wrote:

> I see. However, I am already using multiple fragments on the same Activity
> with the Navigation Drawer, like Google suggests.
>

I found it easier to navigate to new Activities that extend some
NavigationDrawerActivity base then having one uber-Activity that manages *every
single fragment* from the navigation drawer.

>
> One question though: I am trying to implement a shared content element
> transition from my main activity to the details activity. The problem is
> that the content on the first activity is inside a fragment, and calling an
> intent with a shared element transition to the details activity doesn't
> work.  (If I use a fragment for the details this is easier to do).
>
> Any ideas?
>

Sorry, haven't done enough with transitions to help here.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CANCScggak7bYZx4-k0s04cDMpYCMg84i2pz-nr04WGrEJan-vg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Master Detail Flow with Fragment or Activity

2016-05-31 Thread Amitai Rosenberg
I see. However, I am already using multiple fragments on the same Activity with 
the Navigation Drawer, like Google suggests. 

One question though: I am trying to implement a shared content element 
transition from my main activity to the details activity. The problem is that 
the content on the first activity is inside a fragment, and calling an intent 
with a shared element transition to the details activity doesn't work.  (If I 
use a fragment for the details this is easier to do). 

Any ideas?
Thanks! 

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/68fc7f3e-098e-42ee-8cd9-026a1a661711%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Master Detail Flow with Fragment or Activity

2016-05-31 Thread TreKing
On Sat, May 28, 2016 at 1:20 PM, Amitai Rosenberg 
wrote:

> Thanks. It says there like I wrote. My question is- why? Why don't they
> suggest to use a fragment also for a small screen device, and just replace
> fragments?
>

Having one activity manage two fragments on a phone (or small screen
device) adds complexity and responsibility to that Activity. Ideally each
Activity does exactly one thing represented by a screen - either showing a
master list or showing the details of item, in this case.

This also makes it easier to test and re-use. Suppose you want to jump into
an item detail from somewhere other than the master page (deeplinking for
example). If you have the one activity now it has to handle deeplink logic
then bypass the first screen to move to the detail fragment. Then what
happens when you go back? You shouldn't be going back to master (that's
"up"), so now you're jumping through hoops to get the desired behavior.
Keep them separate and life is ultimately easier.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CANCScggbU14kSGjGoceft7HaaXt4x47LEWy1yc39s%3D6RXGE5zA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Master Detail Flow with Fragment or Activity

2016-05-28 Thread Amitai Rosenberg
Exactly. 

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/8d839899-307e-43e2-b4d4-5cc6ca9f21f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Master Detail Flow with Fragment or Activity

2016-05-28 Thread TreKing
On Sat, May 28, 2016 at 1:20 PM, Amitai Rosenberg 
wrote:

> Thanks. It says there like I wrote. My question is- why? Why don't they
> suggest to use a fragment also for a small screen device, and just replace
> fragments?


Are you asking why have two activities on phones, each with one fragment,
vs one activity that swaps out two fragments?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CANCScggNFDjP8cw81Nh%3D2pkycR0qcOPdF29t5wq8s5B2Ygvoaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Master Detail Flow with Fragment or Activity

2016-05-28 Thread Amitai Rosenberg
Thanks. It says there like I wrote. My question is- why? Why don't they suggest 
to use a fragment also for a small screen device, and just replace fragments?

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/85bc8f58-3ba4-4a3a-ac57-6f7c21edf354%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Master Detail Flow with Fragment or Activity

2016-05-28 Thread Amitai Rosenberg
Thanks. It says there like I wrote. My question is- why? Why don't they suggest 
to use a fragment also for a small screen device, and just replace fragnents?

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/e0aff950-7bf6-4088-8aab-6d5ef10fdac8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Master Detail Flow with Fragment or Activity

2016-05-27 Thread TreKing
On Thu, May 26, 2016 at 12:04 PM, Amitai Rosenberg 
wrote:

> I'd be happy for some guidelines and explanations.


https://developer.android.com/training/implementing-navigation/descendant.html

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CANCScgj3VswsC6b3xQDJDDzN9neTvLsnGp0ptXdarv%2B1q1Atfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Master Detail Flow with Fragment or Activity

2016-05-26 Thread Amitai Rosenberg


I'm making an Android app from which the user can choose content to read.
There is a list of books, and once the user chooses one, it opens a new 
screen with the content, and a second navigation drawer for navigating 
through the book.


I'm not sure if this screen should be a fragment or an Activity.

I see a lot of recommendations to use fragments, but if you choose a 
Master/Detail Flow template in Android Studio, it creates an *Activity* for 
the details (at least for small screen sizes).

Why is this?

I'd be happy for some guidelines and explanations.

Thanks!

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/1746c51b-d708-4c33-a4be-550d52599e23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.