1 Activity, 2 Fragments and setting orientation
I have an Activity where the 1st Fragment (whose orientation is locked) solicits input from a user. This data is used to determine how to orient the 2nd Fragment. This orientation will also be locked. I am guessing I will have to make a call to setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) either from the Activity or the 2nd Fragment. My question is where best to do this. Does it really make a difference? Can this action be performed w/o undergoing an Activity restart?
If changing the setRequestedOrientation state requires the screen to rotate then it will restart the activity. For example if you request ActivityInfo.SCREEN_ORIENTATION_PORTRAIT while the screen is in landscape, it will restart. However it will not restart if the phone is already in that orientation.
get data of listview item on click
Application crashes when I use the path of ndk in the build.gradle in Android Studio 2.3.1
Android Developement: Bluetooth Low Emission Advertisement is “Not Supported” on compatible devices
Adding a Contact in Android with last name
Dagger2 “test” class generated but not able to import it
Ionic2 navbar with icons left and right in android
Android:Can we popBackStack() the fragments from fragmentmanager stack list after Activity state save onSaveInstanceState(Bundle outState)
how to create expandable listview with cursortreeadapter?
How to application uninstall time call Web API in Android?
vlc in android studio with ffmpeg in linux
Load an image from assets folder using openGL and show it into the app
Android - Add bottom navigation view dynamically
How to get Images from Cursor in android?
How to know connectable Wi-Fi list on android?
One Custom Alert Dialog for two activities
Not able to set Onclicklistener on a editext present in a popup