I am creating on android app. i want to know how to load different layout for tablet and phone. The reason is phone screen is small so layout i have prepared is different and tablet screen is big so i want to load different layout for tablet.
> I am creating on android app. i want to know how to load different layout > for tablet and phone. > The reason is phone screen is small so layout i have prepared is different > and tablet screen is big so i want to load different layout for tablet.
> any idea how to do that.
> thanks
> -- > 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+unsubscribe@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en
> On Mon, Apr 16, 2012 at 8:50 AM, Amit Mangal > <forum.amit.man...@gmail.com> wrote: > > Hi there,
> > I am creating on android app. i want to know how to load different layout > > for tablet and phone. > > The reason is phone screen is small so layout i have prepared is > different > > and tablet screen is big so i want to load different layout for tablet.
> > any idea how to do that.
> > thanks
> > -- > > 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+unsubscribe@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+unsubscribe@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en
<forum.amit.man...@gmail.com> wrote: > what is this i want to load different activity for tablet and different for > phone how to do that ?
That is not a great idea, in general. That being said, you can find out the screen size bucket from a Configuration object and use that in an if() test to decide which Intent to use with startActivity().
> On Mon, Apr 16, 2012 at 8:58 AM, Amit Mangal > <forum.amit.man...@gmail.com> wrote: > > what is this i want to load different activity for tablet and different > for > > phone how to do that ?
> That is not a great idea, in general. That being said, you can find > out the screen size bucket from a Configuration object and use that in > an if() test to decide which Intent to use with startActivity().
> -- > 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+unsubscribe@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en
> On Mon, Apr 16, 2012 at 6:32 PM, Mark Murphy <mmur...@commonsware.com> > wrote:
>> On Mon, Apr 16, 2012 at 8:58 AM, Amit Mangal >> <forum.amit.man...@gmail.com> wrote: >> > what is this i want to load different activity for tablet and different >> > for >> > phone how to do that ?
>> That is not a great idea, in general. That being said, you can find >> out the screen size bucket from a Configuration object and use that in >> an if() test to decide which Intent to use with startActivity().
>> -- >> 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+unsubscribe@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+unsubscribe@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en
On Mon, Apr 16, 2012 at 6:41 PM, iñaki <inaki.s...@gmail.com> wrote: > One solution is for example: > -- Create a layout in layout folder > -- Create a layout in layout-xlarge folder with two panes
> In the activities you can ask for the second pane... If you have > second pane you´re in a xlarge resource.
> Iñaki
> On 16 April 2012 15:05, Amit Mangal <forum.amit.man...@gmail.com> wrote: > > ok thanks
> > On Mon, Apr 16, 2012 at 6:32 PM, Mark Murphy <mmur...@commonsware.com> > > wrote:
> >> On Mon, Apr 16, 2012 at 8:58 AM, Amit Mangal > >> <forum.amit.man...@gmail.com> wrote: > >> > what is this i want to load different activity for tablet and > different > >> > for > >> > phone how to do that ?
> >> That is not a great idea, in general. That being said, you can find > >> out the screen size bucket from a Configuration object and use that in > >> an if() test to decide which Intent to use with startActivity().
> >> -- > >> 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+unsubscribe@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+unsubscribe@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+unsubscribe@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en
> unable to understand do you have any small example ?
> thanks
> On Mon, Apr 16, 2012 at 6:41 PM, iñaki <inaki.s...@gmail.com> wrote:
>> One solution is for example: >> -- Create a layout in layout folder >> -- Create a layout in layout-xlarge folder with two panes
>> In the activities you can ask for the second pane... If you have >> second pane you´re in a xlarge resource.
>> Iñaki
>> On 16 April 2012 15:05, Amit Mangal <forum.amit.man...@gmail.com> wrote: >> > ok thanks
>> > On Mon, Apr 16, 2012 at 6:32 PM, Mark Murphy <mmur...@commonsware.com> >> > wrote:
>> >> On Mon, Apr 16, 2012 at 8:58 AM, Amit Mangal >> >> <forum.amit.man...@gmail.com> wrote: >> >> > what is this i want to load different activity for tablet and >> >> > different >> >> > for >> >> > phone how to do that ?
>> >> That is not a great idea, in general. That being said, you can find >> >> out the screen size bucket from a Configuration object and use that in >> >> an if() test to decide which Intent to use with startActivity().
>> >> -- >> >> 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+unsubscribe@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+unsubscribe@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+unsubscribe@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+unsubscribe@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en