Nexus 7 - mysterious blank search screen when orientation change - android

When finishing an activity (landscape), going back to another activity (portrait), the below screen appears. Why? There is no error message.

Add this : android:configChanges="keyboardHidden|orientation" to the Activity inside your AndroidManifest.xml

Related

Android splash screen / launch screen also shows when keyboard is resizing

I have a blue image as splash screen for startup.
However inside my app when an open keyboard is closed it shows the background imagine of the splash screen for a brief second which looks very weird.
windowSoftInputMode is set to
android:windowSoftInputMode="adjustResize"
I think adjustResize is right.
What could I do to solve the problem? Why is the splash screen even in the background?
No clue if you do this already, but for activities like a splash screen where you only use it once and returning isn't wanted, remember to call finish(). If you finish the activity, it will not be in the activity stack. Try adding finish() after the intent that takes you away from the splash screen

On ICS devices Current Activity disappearing when screen gets locked

In activity manifest file i have marked it as android:noHistory="true" because I did not want the screen to be added to the activity stack.
when I lock the screen and unlock it. The activity disappears and the previous screen appears. This should not happen. Please any one can suggest me, how can i handle this on ICS devices. However its working fine on Gingerbread devices.
Remove android:noHistory="true" in android manifest file and call the finish when you move out of that Activity. This will remove the activity completely from the stack and it will not be displayed in your backstack. I hope this will work for you

How to preserve orientation during a popup?

I am using menu in an activity to display a popup window.
The problem is that when the orientation is changed, the popup window disappears and the activity screen is shown again.
(It happens because when the orientation is changed the Activity is started again)
i want that the activity doesnt start again and after orientation change the popup window doesnt vannish.
please chenge activity in manifest file
put in activity below code
android:configChanges="orientation"
Please make the following changes to manifest where you defined your activity
add this lines:
android:screenOrientation="landscape" or
android:screenOrientation="portrait"

Android disable landscape mode

I wish to disable the landscape view in an android application . I've used :
<activity android:name=".SomeActivity"
android:label="#string/app_name"
android:screenOrientation="portrait">
It works but there is a slightly big problem . If I rotate the screen the activity restarts , and when it comes back , the screen is still in portrait mode . I want my app to completely ignore the device's position . There is no point in disabling the landscape view if when I rotate the device the activity restarts ( the screen becomes black for a few seconds , and then the activity appears again still in portrait mode ) .
android:configChanges="orientation|keyboardHidden|keyboard"
write a class and extend it to the activity. In that class add this code to a method.
setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
Then call this method to the activites to which you want to disable the landscape mode..

TabActivity Implementing

I am trying to make a tab activity. It works fine . I make
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" in the definition in manifest file. But sometimes it does not take the full screen when launching. My program starts from a splash screen. That is an normal activity. My tab is at the buttom of the screen. So the tabs are go inside the screen.
Does Anyone know about the problem?
Remove .FullScreen and instead use
android:theme="#android:style/Theme.NoTitleBar"
with your activity tags in AndroidManifest.XML, worked out for me
EDIT
in your Activity onCreate method use
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

Categories

Resources