Sorry I don't follow, are you saying your layout doesn't care about the
orientation, but if you should still be checking the orientation?  Because
if that is the question, then I think the answer is no. :)

On Wed, Nov 30, 2011 at 5:02 AM, m3n0R <[email protected]> wrote:

> Ok I'll try it to do.
>
> Another thing is. Imagine I've made an specific layout, that handles
> different kind of screen wides, but it doesn't care about if you in
> portrait. Shall I use a condition and use a different layout for every
> position?
>
> For example:
>
> if (getResources().getConfiguration().orientation ==
> Configuration.ORIENTATION_LANDSCAPE) {
>    //specific layout for LANDSCAPE
>    mAdapter = new
> NoLocGigAdapter(getActivity(),R.layout.no_loc_gig_list_landscape,gList);
> else {
>   //Portrait Layout
>   mAdapter = new
> NoLocGigAdapter(getActivity(),R.layout.no_loc_gig_list_portrait,gList);
> }
> setListAdapter(mAdapter)
>
>
> And in the getView() method:
>
> if (getResources().getConfiguration().orientation ==
> Configuration.ORIENTATION_LANDSCAPE) {
>    //specific layout for LANDSCAPE
>     holder.tit.setText(g.getTitle());
> else {
>   //Portrait Layout
>   holder.tit.setText(g.getTitle());
>   holder.des.setText(g.getDescription());
>   holder.slots.setText(String.valueOf(g.getSlotsFree()));
>   holder.time.setText(g.getTimeLeft());
> }
>
>
> Thank you again
>
>
> On 28 nov, 21:17, Dianne Hackborn <[email protected]> wrote:
> > That is working as intended for that sample.  If you want to return to
> the
> > details in portrait, you will need to use a different approach for
> > implementing the UI, entirely using fragments.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Mon, Nov 28, 2011 at 7:37 AM, m3n0R <[email protected]> wrote:
> > > Hi everybody:
> >
> > > I've just have developed something like the FragmentLayoutSupport
> > > example from Google, to show a ListView and Details from every element
> > > in the list.
> >
> > >http://developer.android.com/resources/samples/Support4Demos/src/com/.
> ..
> >
> > > The point is, when you you get the list in PORTRAIT mode, and you
> > > select details (a TextView), you enter to the Fragment wanted
> > > (DetailsFragment). Once you are therem if you turn the phone to LAND
> > > mode, the element is well selected, but once we turn again the phone
> > > to PORTRAIT mode, tada! we are on the list screen instead the Details
> > > screen.
> >
> > > Anybody knows how to solve that? Is the example wrong?
> >
> > > --
> > > 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
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > [email protected]
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
>
> --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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