screen-rotation
PhoneGap – Forcing Landscape orientation
Have you tried this? android:screenOrientation=”portrait” Inside the AndroidManifest.xml file, where you have declared your activity, just add the above line. For example: <activity android:name=”.Activity.SplashScreenActivity” android:label=”@string/app_name” android:screenOrientation=”portrait”> <intent-filter> <action android:name=”android.intent.action.MAIN” /> <category android:name=”android.intent.category.LAUNCHER” /> </intent-filter> </activity>
iOS 6 rotations: supportedInterfaceOrientations doesn´t work?
If your ViewController is a child of a UINavigationController or UITabBarController, then it is the parent that is your problem. You might need to subclass that parent view controller, just overriding those InterfaceOrientation methods as you’ve shown in your question EDIT: Example for portrait only TabBarController @interface MyTabBarController : UITabBarController { } @end @implementation MyTabBarController … Read more
UIImagePickerController camera view rotating strangely on iOS 8 (pictures)
I believe it is an iOS 8 bug. For example if you open your contacts app and click edit/add photo/take photo, the same issue occurs on a standard iOS app! Post the issue to Apple support just as I have.
Retain the Fragment object while rotating
By default Android will retain the fragment objects. In your code you are setting the homeFragment in your onCreate function. That is why it is allways some homeFragment or fl what ever that you set in onCreate. Because whenever you rotate, the onCreate will execute and set your fragment object to the first one So … Read more
How to save custom ArrayList on Android screen rotate?
You do not need to create a new class to pass an ArrayList of your custom objects. You should simply implement the Parcelable class for your object and use Bundle#putParcelableArrayList() in onSaveInstanceState() and onRestoreInstanceState(). This method will store an ArrayList of Parcelables by itself. Because the subject of Parcelables (and Serializables and Bundles) sometimes makes … Read more
How to handle an AsyncTask during Screen Rotation?
You can check out how I handle AsyncTasks and orientation changes at code.google.com/p/shelves. There are various ways to do it, the one I chose in this app is to cancel any currently running task, save its state and start a new one with the saved state when the new Activity is created. It’s easy to … Read more
RecyclerView: Inconsistency detected. Invalid item position
I had a (possibly) related issue – entering a new instance of an activity with a RecyclerView, but with a smaller adapter was triggering this crash for me. RecyclerView.dispatchLayout() can try to pull items from the scrap before calling mRecycler.clearOldPositions(). The consequence being is that it was pulling items from the common pool that had … Read more