Android :: Switch To Landscape Then Back Portrait - Inflate Exception
Jul 23, 2010
I've met a very strange issue that my app will crash if user first switch to landscape, then back to portrait. I found that Activity.setContentView() will throw an inflate exception. It said:
android.view.InflateException: Binary XML file line #29: Error inflating class <unknown>
This crash will happens on Android 1.6/2.1/2.1-update1, but doesn't happen in 2.2 Froyo. In Froyo, everything works fine. If the XML I used is invalid, it should happens every time when I try to inflate. But why it's okay on the first time of running and switching to landscape? This also only happens on some devices. For example, there two HTC G1 with same software installed on it and has the same configuration, one has this issue and the other one works fine.
View 7 Replies
Feb 11, 2009
I have written a small example which displays the photos from the server. Its working fine when the device is in one of the mode (landscape of potrait). But if I switch to landscape to potrait or potrait to landscape while downloading the photos from the server, I am getting NullPointerException, showing with androidRunTimeException.
I am using LinearLayout -> ImageView
I am using threads to download the images.
View 4 Replies
View Related
Aug 20, 2010
I like to use Swype in portrait mode but the Android keyboard in landscape mode. Is there an app to auto-switch the keyboard based on the orientation of the phone?
View 13 Replies
View Related
Feb 1, 2009
Is there a way to pro grammatically force the screen to change between landscape and portrait mode? I want to allow the user to choose a menu item to rotate the screen, instead of relying on pulling out the keyboard. I am looking for something like activity.change Screen Orientation, but couldn't find such a thing in the API docs.
View 3 Replies
View Related
Sep 3, 2010
I have been trying to find some information if there is any way to adjust how sensitive the phone is to switch from portrait to landscape.I hate the fact that I have to shake my phone to get it to switch Other phones I have have used never were this stubborn before.
View 19 Replies
View Related
Jul 30, 2010
Flashed the CM6 RC1 Rom and have been running smooth as glass. Suddenly, it is crashapaloosa on me. I am betting it is the hinky Flash 10.1 that is doing it. It happens mostly when I switch from portrait to landscape view.
Also getting odd messages like "Unable to Log In". Not sure what it is logging into but apparently it can't. Anyone else having issues? Will try dumping Flash 10.1, also will try shutting down SetCPU and see if those don't help. Ah bugs ;-)
View 5 Replies
View Related
Mar 20, 2010
I've racked my brain for hours over this issue. I have created a main.xml and designed one for the res/layout-land (landscape) format and another one for portrait in res/layout. When I rotate the emulator (ctrl-F11), my app rotates properly to landscape using the correct main.xml, but a subsequent rotation back to portrait just keeps the landscape mail.xml. This was done in a 2.0 AVD.. Out of desperation I downloaded the new Sample Code for Multiple Resolutions and had to create a new 2.1 AVD, to my surprise rotation with this app works correctly as expected. So I then decided to try my app on the 2.1 AVD and it works perfectly. So, is this a Bug in a 2.0 AVD or is there something special I need to be doing for < 2.1 SDK versions?
View 4 Replies
View Related
Apr 28, 2010
Is anyone elses phone not flipping back and forth from portrait to landscape view when they rotate the phone? Ive check the settings and it is set to change orientation when phone rotates but for some reason it is not doing it.
View 29 Replies
View Related
Nov 10, 2010
I tried it and it works so far.
Dev = ne0fhyk from XDA.
From the XDA forum: Link to app page = [APP][ROOT/Keyboard] Keyboard Manager - Dual keyboard: Portrait/landscape switch - xda-developers
Verbage:
Keyboard Manager allows you to customize what keyboard (input method) appear on input based on your phone orientation.
It displays the keyboards you have enabled on your android device, and let you select one per orientation (landscape/portrait).
As your phone switch orientation, the app automatically switch the keyboard.
Requirements:
- Rooted android device (app was tested on Samsung captivate 2.1)
- Root Explorer app, or similar app that allows you to edit the permissions of a file.
To install:
1- Download the app (KeyboardManager.apk) on your device sdcard.
2- Using Root Explorer, move the apk file to /system/app
3- Using Root Explorer, edit the file permissions like below:
-- User: 'Read/Write' checked
--Group: 'Read' checked
--Others: 'Read' checked
4- Exit Root Explorer
The app should be visible in your launcher as 'Keyboard Manager'
Update:
- Added option to disable notification icon
-' start on boot' feature is disabled because it's not yet complete and tested... Sorry for the confusion
Bugs:
-On certain applications (i.e: Messaging on Samsung Captivate), the input window occasionally freeze on orientation switch. Exiting the app, and resuming should fix it.
The app is still in development.
View 11 Replies
View Related
Oct 12, 2010
I know if you change a android phone from portrait to landscape sometimes the app relays its self out on the screen.. so how do I simulate rotating a phone with the AVD? On the Blackberry emulators there's a button in the menu to turn the phone, but I can't find it or any option on the Android ones?
View 1 Replies
View Related
Apr 3, 2009
I want to display a table which would fit better in portrait view than in the landscape view. How do i instruct the emulator to change the orientation?
View 4 Replies
View Related
Jul 8, 2010
How did you support both landscape and portrait for appwidget? the layout of appwidget will never change when orientate the device from landscape to portrait. by the way, would you please tell me which device support both landscape and portrait for appwidget?
View 1 Replies
View Related
Feb 18, 2010
For changing from portrait to landscape mode i have done some changes in manifest.xml and included some code in test.java file
In manifest.xml i have included <activity_name android:configChanges="orientation"/>
i entered some data in portrait mode. but when i rotate my mobile from portrait to landscape the control goes to onConfigurationChanged() method.
public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); setContentView(R.layout.screen1_landscape);
}
View 3 Replies
View Related
Mar 31, 2009
When we try to implement orientation in AP layer, we can set "android:screenOrientation" parameter in AndroidManifest.xml file or call "setRequestOrientation()" method of Activity class. But if I want to porting android in new HW device, how can I do? Do I need to modify the graphic driver, or just add configuration in program. (Actually I do some experiments but my AP cannot rotate) Besides, can every experts tell me when I set the "android:screenOrientation" parameter, which process will read this configuration, pass to where and which process will do the rotation?
View 2 Replies
View Related
Dec 18, 2009
I'm trying to detect landscape vs portrait orientation with the following:
public void onSensorChanged(SensorEvent event) { float pitch = event.values[2];
if (pitch <= 45 && pitch >= -45) { // portrait }
else if (pitch < -45) { // landscape }
else if (pitch > 45) { // landscape } }
Anyone have something more robust? It works pretty well, except if the phone is in a landscape orientation and the user starts to 'flatten' it out, starts thinking it's in the portrait orientation again.
View 7 Replies
View Related
Jan 23, 2010
I've seen references to being able to specify two separate layout xml files for an activity, one for Portrait and one for Landscape. I've not been to find any information on how to do that though. How do I specify for each activity which xml file is it's portrait layout and which is the Landscape layout? Is it also possible to specify different layouts for different screen sizes? If so, how is this done?
View 2 Replies
View Related
Jun 17, 2010
How to add rotation effect when change mode portrait to landscape? I want to make it smooth.
View 2 Replies
View Related
Sep 26, 2010
I made an app thats use the camera. The first problem i get was that i can't use portrait preview without the rotation 90º image. I used the solution (landscape for all), but now, only in the real device, when i start the app and i have the device in portrait mode it crashes (need to force close) and only after reboot the phone its possible to connect to camera, even in the camera app.
View 2 Replies
View Related
Aug 3, 2010
Since the FROYO update some stuff is only in Lanscape and it's what I would call upside down. Is there a fix for that? Like Gmail and internet and some others I noticed. Other than that it's smokin fast and everything is working fine for me.
View 16 Replies
View Related
Jun 19, 2010
As u know, since android 1.6, there are not dirs on dirs like HVGA-L. Instead, there is only one dir like HVGA. That is, HVGA-P and HVGA-L are merged into one dir, HVGA. So, only HVGA can be selected and by default the emulator is started with portrait mode. Though I can press CTRL+F11/F12 to switch it to landscape mode, I do not like it. What I want is to start the emulator with default mode of landscape. Would anyone know how to do it?
View 3 Replies
View Related
Nov 10, 2010
While working on orientation change I have found that the onConfigurationChanged is not getting called when changing the orientation from portrait to landscape.But when I am changing from landscape to portrait the method is getting called. Is it the correct behavior because the onConfigurationChanged should by called whenever we are changing the orientation. (android:configChanges="orientation")? I have also found one strange behavior or error, When we are changing from portrait to landscape orientation the string value is displayed correctly(automatically by android system) but when in am changing the orientation from landscape to portrait the same string is displayed(i.e the string in landscape mode).The expected behavior is the string id specified in the portrait mode should be displayed.Is it an platform bug or something wrong in my code/programming.
View 2 Replies
View Related
Aug 25, 2009
Does anybody know how to rotate whole system screen from landscape to portrait?The platform is not G1 or any other phones, it's just a normal ARM platform.Not only one application but whole system.
View 1 Replies
View Related
Nov 15, 2009
I have an app that I started in 1.6. It used images that were specific to portrait and landscape layouts. I put these in the corresponding drawable folders, for example:
drawable/image01,png
drawable-land/image01.png
when I created a new project with 2.0 it gave me the following folders. drawable drawable-hdpi drawable-mdpi drawable-lpdi. when I look at the documentation around these folders it all seems very straight forward. I assumed that you were able to create the following folders. drawable-hdpi-land drawable-mdpi-land drawable-lpdi-land
and everything would work as before. The image directory would swap automagically pulling the appropriately laid out image depending on your screen orientation. Unfortunately it does not. The SDK seems to get confused, and if I clean the project, the folders come up as poorly named.
View 3 Replies
View Related
Oct 1, 2009
I am facing a problem when i put a text view on screen in landscape mode it position is fine but when i switch to portrait mode it position is remain fix it not change according to screen resolution.
View 2 Replies
View Related
Aug 29, 2010
I am finding that my layouts tend to look great in one orientation but if I change the phone's orientation, things are a mess. For example on one screen I have 6 large buttons that look great in portrait orientation but if the user changes phone orientation, those buttons get cut off in portrait.
Do I need to code two layouts for every screen - one for portrait and one for landscape? That would be such a waste of time.
View 1 Replies
View Related
Nov 5, 2009
I want to know the device state programmatically.
I mean whether the device is in portrait mode or in landscape mode by programming (in a class which extends the Activity).
View 4 Replies
View Related
Mar 28, 2010
How to rotate the screen to landscape (or portrait) by programmable way? I am trying to make it independent when user rotates the screen.
View 2 Replies
View Related
Apr 19, 2010
My application should hold a camera preview surface. The camera is fixed to landscape view via AndroidMainfest.xml I am quite new to the Android plattform programming. Of course I don't know much about the programming tricks and workarounds yet. I did a lot of research over the last two weeks (even studied the native Camera implementation), but couldn't find a good solution so far.
View 2 Replies
View Related
Sep 8, 2010
I am writing two xml files for landscape and portrait and create res/layout-land folder,execute my code but did not work portrait mode,have any setting set for work my code for landscape and portrait..please give any sample code for that.
View 1 Replies
View Related
Feb 28, 2009
how the application knows that the view of device has changed from portrait to landscape.is there any way to know the application about view change.
View 2 Replies
View Related