Sunday, November 28, 2010

[android-developers] Re: How to change orientation of customized sliding widget?

yeah the device screen orientation is changing when i change it from
portrait mode to landscape mode. But in my app the customized sliding
tab is not changing it's orientation...
can plz,some body help me out ...

thanks in advance..

On Nov 28, 10:48 pm, Kumar Bibek <coomar....@gmail.com> wrote:
> The device on which you are testing, does the Home screen change to
> landscape when the orientation is changed? If not, then it will not
> work. First you have to make sure the the Homescreen does rotate.
>
> On Nov 28, 12:51 am, jani basha shaik <jani....@gmail.com> wrote:
>
> > Thanks for your reply ,
>
> > But i had separate xml layout files for both protrait and landscape
> > modes even though i am not getting the required orientation. what is
> > my exact requirement is i had to get my customized sliding widget as
> > horizontal in protrait mode and in landscape mode it in veritcal but i
> > am getting horizontal in both modes .
> > I am sure that i didn't done any orientation changes through
> > programatically. Until now what i have tried are as follows:
>
> > Trail #1
> > i had specified android:orientation = "horizontal" attribute for my
> > customized sliding widget which is linear layout basically in protrait
> > mode  similarly for landscape mode i had separate layout file in that
> > i had specified attribute as
> > android:orientation = "vertical"
> > It has no effect.
>
> > Trail #2
> > i am querying the screen orientation as which orientation currently it
> > showing then depending on that screen orientation i am setting
> > orientation of my customizedslidingtabwidget as follows :
>
> > // Query what the orientation currently really is.
> > if (getResources().getConfiguration().orientation ==
> > Configuration.ORIENTATION_PORTRAIT) {
> > LinearLayout slidingtabWidget = (LinearLayout)
> > findViewById(R.id.alteranateunlocker);
> > slidingtabWidget.setOrientaiton(LinearLayout.HORIZONTAL);}
>
> > else
> > slidingtabWidget.setOrientaiton(LinearLayout.VERTICAL);
>
> > IT also having no effect
> > what else i have to try ?
> > can any one please suggest me to get out of this issue
>
> > thanks in advance
> > janibasha

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

No comments:

Post a Comment