android


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.

Related Links

Error while setting bitmap image to ImageView
How to set permissions for Android using Phonegap Build?
Android: Google Developer Console shows supported devices 0?
MapView is loading no location
Check if Edittext is empty that only accepts numbers
Some rating options have been disabled based on the content of your application
How to store data in sqlite database using jQuery-mobile dreamviewer cc with phonegap in android?
How to play YouTube videos in WebView on Amazon Fire TV?
Android AsyncTask HttpPost Connection Refused
Android layout similar to Google Now
How can I use Picasso to add icon to Marker?
MPandroidchart Double YAxis with different scales
Emulator crashes and runs slowly on new computer
Can i use Sqlite query for edit SMS's database
meteor build for android does not update client
RecyclerView highlight item on click

Categories

HOME
windows
paraview
depth
angular2-material
numbers
apache-spark-mllib
sitecore
cq5
nested-if
bookmarks
iis-6
crystal-reports-2013
odoo-8
opengl-3
g++
google-chrome-app
plist
java.util.logging
ipmitool
cumulocity
event-sourcing
connector
string-concatenation
visual-studio-extensions
joptionpane
pchart
mongoid6
scriptella
flask-sqlalchemy
dynamically-generated
maze
opentk
progress-bar
jaws
mockjax
hreflang
classcastexception
vue-chartjs
video-capture
engine.io
magento-1.9.2.4
watchman
gdata
datacachefactory
movilizer
logback-groovy
hammer.js
dtsearch
payara-micro
wpas
ngmaterial
mach-o
objectscript
mathcad
restore
burrows-wheeler-transform
neon
vorpal.js
tracker-enabled-dbcontext
database-relations
nio2
blitline
qt5.2
roadkill-wiki
sony-lifelog-api
jdk1.7
ms-access-2000
public-html
browserify-shim
ssis-data-flow
genymotion-call
trdion2011
ora-00904
reflector
live555
functional-java
synapse
multiautocompletetextview
git-repo
syndicationfeed
notorm
rolify
chart-director
veracity
subproject
thttpd
apache-whirr
fitbounds
denied
presentation-layer
uideviceorientation
ie-compatibility-mode
folding
blender-2.49
mathematical-notation

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App