How could I make such thing - when you rotate screen from horizontal to vertical application set on pasue (and show screen where is said that you should to rotate screen in vertical to continue e.t.c)?
Or how I can just disable screen rotation?
How could I make such thing - when you rotate screen from horizontal to vertical application set on pasue (and show screen where is said that you should to rotate screen in vertical to continue e.t.c)?
Or how I can just disable screen rotation?
Set the screen orientation to portrait or landscape (depending on your requirements) in the Android manifest file.
Then listen to the Accelerometer events if required.
I believe the answer you are looking for is in the activity life cycle of android apps.
I found this link and browsing it now. How do I disable orientation change on Android?
edit: from there I can see that all that needs to be done is modify
android manifest file to include this in your activity
<activity android:name="MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize">
inside your MainActivity this should be included
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}