Android :: Can Force A Specific Layout Orientation - But Have An Opposite Keyboard Orientation Android

Aug 19, 2010

I understand how to force a specific orientation per activity in the android manifest. I would like to know if it is possible to allow the keyboard to change orientation even though the activity(the layout really) must remain unchanged.

Android :: Can force a specific layout orientation - but have an opposite keyboard orientation Android


Android :: Orientation Change - Dialog Above Activity With Fixed Orientation

May 14, 2009

I have created an activity for my game which handles all orientation changes by itself and has a fixed "portrait" layout. Actually it uses the accelerometer and is rendered using 2D canvas methods. If the level has been completed I show up a highscore dialog in which the user can enter his name. The dialog is floating above the underlying level screen which gets blurred out nicely. This generally works.

Problem is that the dialog does not get rotated if the orientation of the phone changes. So even if the keyboard is exposed the dialog is shown in portrait mode instead of landscape. I have tried to use an activity with dialog theme instead but the behavior didn't change. After several tries it seems that I have found the reason for this: Once there's an activity with fixed orientation in the activity stack then all subsequent activities keep this orientation, too. They will not react on orientation changes anymore (e.g. if the keyboard gets exposed).

After upgrading to 1.5 SDK the described behavior changed a little bit. Now at subactivities indead react on orientation changes like expected. However, the need to have an opaque background! That means that neither dialogs nor activities with dialog theme will work. Those will stick with the orientation of the underlaying activity. So my workaround is to first start a sub-activity with an opaque black background. This activity then shows my highscore dialog on top. It looks quite okay but I wonder if there's a better solution? Is it possible to show a dialog above a fixed portrait or landscape activity which automatically adapts to orientation changes?

View 3 Replies View Related

Android :: Orientation Changes And Layout

Apr 14, 2010

I figured that I can have custom layout for each orientation just by making two folders layout-port and layout-land. So I put different views in these folders. Worked well.

Now, I have a webview in my activity and it reloads whenever there is any change in orientation. So to prevent that I put android:configChanges="orientation" in my manifest file.

After putting this the reloading stopped but the contents in the layout-port started getting selected for landscape mode as well.

View 6 Replies View Related

Android :: Orientation Specific Failure In ListView.layoutChildren - Exception ArrayIndexOutofBoundsException

Sep 20, 2010

I am a very green android developer and need some help with a strange program crash. Often the program will run just fine. There is an equal chance it will fail (see stack at the end). I can watch the program run through the getView function and everything seems in order (i.e. all the information is there as expected and passes through convertView seemingly fine). Either it will go through a few times and then program will be A-OK or it will fail as seen below and I have not been able to pick out what causes the crash. Even stranger is that if I hold the phone in landscape mode, it will never fail!! It only fails about 50% of the time in portrait orientation.

CODE:.................

-----------------------Failure----------------------------------------------

CODE:.........................

View 1 Replies View Related

Android :: Any Way To Force Landscape Orientation?

Jun 3, 2010

I'm new to android and i was wondering if there's anyway to force landscape mode at all times. Another way of saying it, i never want to see portrait orientation on my device. Is there any settings or apps that will force landscape mode at all times (unless an app requires portrait)?

View 1 Replies View Related

Android :: Force Horizontal Orientation Programatically?

Oct 4, 2010

My application has a portrait mode, and a landscape mode. I want the user to be able to force the landscape orientation by clicking on a button. How can I do this programatically?

View 1 Replies View Related

Android :: Change Eclipse Layout Orientation

Nov 6, 2010

I want to know how to change the orientation of my layout inside of eclipse but when I click the "layout" button it still shows it as a vertical layout.

View 4 Replies View Related

Android :: How To Change Eclipse Layout Orientation?

Nov 6, 2010

I want to know how to change the orientation of my layout inside of eclipse.

View 1 Replies View Related

Android :: Reload Layout - Xml - When Orientation Changed

Feb 27, 2009

I have a program with two layouts: - layout/main.xml - layout-land/main.xml

Also, i have some images en drawable and drawable-land...

My problem is: When i change the orientation of the emulator (for examplo: portrait to landscape) i don't know how reload the main.xml layout to update the screen with the new positions....

If I launch the emulator in portrait the application load the portrait layout, and if I launch the emulator in landscape mode the application load the landscape layout, but if I change the orientation in execution mode the application don't load the new layout...

How can I reload the layout?

View 3 Replies View Related

Android :: Layout Problem When Orientation Changed

Jun 23, 2010

My activity use the same RelativeLayout as it's content view whatever the orientation is. In this RelativeLayout, there is a FrameLayout align to it's bottom, and a TextView above this FrameLayout, just like :

CODE:...........

on android 1.5 device when orientation changed, the TextView lies in the wrong place, middle when portrait, bottom when landscape. on android 1.6 device It is ok.

How could I make it lies in the place where it should be on 1.5 device?

View 2 Replies View Related

Android :: Problem With Camera And Layout Orientation

Apr 9, 2009

I've been trying to solve this for awhile now, and still couldn't find a solution to it. To properly display my SirfaceView consumed by the camera, I have forced my activity's layout in landscape mode. However, in my app the camera functionaluty will be mostly used in portait mode, and therefore all other views in the same activty have to be in portrait mode. Needless to say if I don't force the activity in landscape, the SurfaceView is 90 degrees rotated.

View 9 Replies View Related

Android :: Way To Force Screen Orientation To Landscape Right As Of Froyo?

Sep 24, 2010

We currently use Activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_x) to set (and 'freeze') the orientation of our app. Froyo now supports two landscape modes tho and we'd like to allow our users to orient the app to 'landscape right' ... ie, the orientation obtained by turning a device naturally oriented to Portrait 90 degrees clock wise.

View 3 Replies View Related

Android :: Force Screen Orientation And Destroy Call

Aug 27, 2009

I want my Activity to be always in portrait mode and I do NOT want the onDestroy() method to be called. There are some interesting articles about that at: http://www.androidguys.com/2008/11/24/rotational-forces-part-four/

The solution seems to be: In AndroidManifest.xml:

CODE:...............

I've tried it and it seems to work. Is there any other alternative or is it the correct solution?

View 7 Replies View Related

Android :: How To Change Orientation Of Xml Layout Area In Eclipse

Feb 19, 2010

The xml files that contains the Activity layouts can be rendered by Eclipse.

How do I get that Eclipse screen area to have vertical orientation, not horizontal (inside Eclipse - it correctly shows as vertical in the emulator)?

View 1 Replies View Related

Android :: Way To Have View Use Different Layout When Orientation Change Occurs

Oct 2, 2009

is there a way to have a view use a different layout when an orientation change occurs. suppose i want the view to look one way in portrait and another way in landscape. all the same data, but arranged differently.I'm thinking one way to do this would be to have two different linear layouts with android:visibility="gone" and simply display the appropriate one (set android:visibility="visible") based on orientation -- i.e. do this from code.is there a way to do this in xml? or something like this (i.e. in landscape, put the textview here, in portrait, put it here instead)?

View 2 Replies View Related

Android :: Using Orientation Sensor To Get 360° Orientation

Jul 17, 2009

I have a problem with working with the ORIENTATION values of the SensorManager. I would like to have some kind of 360°-value which directly shows me if the phone is in normal portrait (0°), landscape, portrait turned around (180°) or anything in between. So I could have, for example, an arrow that points to the floor (like gravity would do with a plummet) all the time, no matter how I tilt (sidewards) the phone. I thought this would be easy, but I'm pretty confused at the moment.

First of all, the X value of the orientation-array seems to correspondent with how I turn the phone, BUT: if it's completely uprightly standing, this value is about 60° ... why not 0° (or 90°, 180°, 270°), as I would expect?

Second: The value resets if I turn the phone and Android automatically changes screen orientation. So both in Portrait and in Landscape mode it will be sth. like 60° when the phone is in a 0° angel in real world. I set "android:screenOrientation" to "landscape" but this doesn't help anything :/

I want the app NOT to change orientation when I turn the phone, but I want it to get a continuous orientation value when I tilt the phone.

View 4 Replies View Related

Android :: Layout Weight Is Inconsistent For Horizontal And Vertical Orientation

Apr 8, 2009

I have played around a bit with the xml files for creating layouts and can't explain the behaviour of layout_weight when using it in a LinearLayout that has orientation="vertical"

When creating a layout that is horizontal everything follows the documentation, that a child would get more space if it's has the highest value.

But the following code for vertical orientation, give more space to the item with lowest weight.

CODE:..........

And the question is: Is this a bug or just a feature that maybe need more documentation?

View 2 Replies View Related

Android :: Dynamically Adjust Column And Row Of A Table Layout Based On Orientation

Mar 9, 2010

Is it possible for my android application to dynamically adjust the no of column and no of row of my TableLayout based on orientation?

For example, when in landscape mode, the TableLayout is 3x2 and when
in portrait mode, the TableLayout is 2x3?

View 1 Replies View Related

Android :: Change Orientation Just By Sensing Layout Position , Port / Land?

Apr 15, 2009

I am wondering if we can change orientation just by sensing the layout position, port or land;without flip like iphone does.

View 4 Replies View Related

Android : Assigning Keyboard Based On Screen Orientation

Nov 5, 2010

Finally I've been waiting for something like this. Swype - portrait; stock - landscape.Assign Keyboards Based on Orientation - Keyboard Manager for Android | xda-developers

View 2 Replies View Related

Android :: Prevent Orientation Change On Keyboard Flip Until Thread Execution Completes

Oct 25, 2009

When I flip the keyboard, the layout changes from portrait to landscape, activity is recreated but any background thread keeps running. How can I prevent orientation change/activity from being recreated until my background thread finishes.

View 2 Replies View Related

Motorola Droid :: Keyboard Orientation Bug

Jan 21, 2010

It would be sweet if the Droid (or OS 2.0.1 as the case may be), when switching orientation from portrait to landscape, would keep the keyboard showing if it was already showing in the prior orientation.Often, I'll be typing a text in portrait mode and then realize that I'd prefer to type faster and more accurately.However, when I switch to landscape orientation, I have to click/highlight the text box in order for the virtual keyboard to show again.It's a bit of a hassle.Oh yeah, for the hardware keyboard lovers out there that suggest I use it instead.I hate the hardware keyboard.though curiously,the keypad is pretty nice for moving the cursor.

View 3 Replies View Related

HTC Droid Eris :: Landscape Orientation Of Keyboard

Feb 10, 2010

I just got my Droid Eris. It was working fine to go back and forth between landscape and upright, until I calibrated the G-sensor. Now I'm not sure what's going on. I'm not sure if I've done the calibration correctly (I assume you just sit it upright on a flat surface?) or what. It will randomly go into landscape mode, but then I can't get it back upright unless I go to the home screen.

View 3 Replies View Related

HTC EVO 4G :: Unwanted Forced Landscape Orientation For Keyboard

Aug 3, 2010

I manually installed the Froyo update this morning. According to features' reports this should give me a 270 rotation. However, after choosing Automatic Rotation in settings, I found that anything with primarily text input defaults to and locks in landscape orientation. This includes google search, email, gtalk and text messaging. I prefer reading my email in portrait, so I can see more than 3 of the emails at a time. And since my text input is calibrated in portrait, landscape is just annoying me.

View 1 Replies View Related

Android :: How To Lock Layout Of Android Program To One Orientation

May 31, 2010

I'm trying to write a program that needs smooth orientation sensor samples as the phone is rotated all around. Every time the orientation of the phone is changed, it interrupts the data and freezes the program while the layout changes. How can I lock it in one orientation (landscape or portrait, it doesn't matter)? I assume it has something to do with android:layout in the xml file, but I can't find anything online.

View 4 Replies View Related

Android :: Set Screen Orientation Of A Tab

Mar 18, 2009

I would a Tab (in a TabHost) to have a Landscape orientation while the activity with the TabHost is in Portrait orientation, is that possible (if so how)? I tried setting the orientation of the Activity displayed in the tab in the Manifest but it didn't work.

View 7 Replies View Related

Android :: Orientation Changes For Layouts

Oct 16, 2009

i have a layout folder with 2 layouts. layout1 and layout2 i have another folder layout-land that has layout1 in it. i would like to be able to get to all the layouts so i could create a set of layout like this: {layout1, layout2, layout1(from layout-land folder)}is there any way i can use the existing android mechanisim to do that? if not, what would be the impact of creating my own definition of the layout folder (for example to have under the layout folder layout1, layout2 and layout_land1 and have my code do getOrientation to diffrentiate whcih one should be presented).

View 9 Replies View Related

Android :: App Widget And Orientation Changes

Sep 1, 2009

I've built an app widget a fairly simple one that draws an image inside a frame. (If that sounds familiar, that's because it's very similar to the built-in one, but it's a start to something else.)The RemoteView consists of little more than a FrameView and an ImageView. I have a second FrameView that may display or not depending on some certain state awareness.The Image updates on an Alarm schedule rather than the built-in mechanism so the user can adjust this value after installation. The image is set on the RemoteView using a drawable ID from included resources in the package. They've been resized to approximately a quarter of the screen size, but might still be scaled a little by the ImageView.All of this has been working fine. There is one issue that I've been unable to diagnose even the root of the problem.

After an orientation change when the home screen redraws, the ImageView doesn't always draw. The rest of the RemoteView does draw just as it was set during the most recent Update.The mystery is that the ImageView does, in fact, draw if the Alarm is currently set. If it's not currently set, it doesn't draw. Nothing else seems to affect whether it draws or not. It doesn't matter if the widget process is running or not, either (killing it via DDMS and then rotating has the same effect).This occurs in the emulator as well as the G1. During a rotate, the widget gets no update event at all.I could set it to listen for configuration changed broadcasts, but since it works in one of the cases, I suspect something else is going on and that's just an unnecessary piece of duct tape.

View 12 Replies View Related

Android :: Orientation And Webview

Jun 15, 2010

I have a webview and I am using android:configChanges="orientation" to restrain the webview from reloading everytime the orientation changes.I also have two different folders layout-port and layout-land to define the layouts for different orientations.If I use android:configChanges="orientation" then the above two folders are ignored. Can I have both working at the same time?

View 6 Replies View Related

Android :: How To Set Dialog Orientation?

Jul 28, 2009

My underlying actitvity is set to landscape orientation, but when I show the dialog, I'd like it to be in portrait (vertical) orientation.I set the orientation in my layout to be vertical but that didn't help. The Dialog class doesn't have a method for such a thing.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved