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

Multiple Rectangle drawing programatically
textIsSelectable moves toolbar down [duplicate]
(android) how to determine the ip address of connected devices in android hotspot
Is it possible to stop a service with android:persistent=“true”
adding some elements to edittext i.e some character between any word
Android getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) returns path to /storage/emulated/0 instead of pictures path
Create an animation from images in expansion APK
Activity with blur image
slider not working with setInterval( ) function
How to get street view in google maps?
Update Fragment A after the flow A > B > C > D is successfull
SoundPool not play a mp3?
Android Studio upgrade patch is failing when upgrading to 0.9
Execute Arbitrary JavaScript within WebView
Android studio views with same id
Genexus for Android: Can't assign SDWheel control

Categories

HOME
kentico
ecmascript-6
ns-3
apache-spark-mllib
fftw
rom
telegram-bot
pearson-correlation
jtextpane
owin
openpyxl
mel
cumulocity
asp.net-mvc-viewmodel
cfml
bourbon
imagemap
object-storage
gmock
beta
pylons
ms-access-2003
apktool
cppreference
failover
finagle
mobx
powershell-ise
testbed
dumpbin
git-squash
jett
contacts
classcastexception
watchman
cd
loading
postgresql-8.4
install.packages
openrasta
gitlist
wcftestclient
reportservice2010
netbeans6.8
insight
reindex
scalding
oracleclient
trigger.io
swingworker
javafx-css
reachability
materialized-path-pattern
node-request
qtplugin
cifilter
xdoclet
embedding
freepbx
gcloud-ruby
kiosk
nullable
piracy-prevention
directdraw
ess
slash
evolus-pencil
snackbar
jquery-forms-plugin
diff3
dot.js
mruby
pseudo-class
create.js
codeplex
draw2d-js
paste
sbcl
cnf
nebula
process-explorer
facebook-timeline
pclzip
wimax
xcode3.2
dajaxice
objectquery
lambdaj
predicatebuilder
screen-size
strsep
timthumb
rowlex
filesystemobject
glui
soappy
lemmatization
contentpresenter
wcf-proxy
commercial-application

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