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

Open WeChat browser from Android / iphone app
Actionscript 3 Air for Android DatePicker Ane
AtlasConversationsRecyclerView population with custom HTTP conversations response
Failed to invoke public okhttp3.RequestBody() with no args
How to check a LatLong falls within the city bounds or not in Android App?
Programatically send text using bluetooth socket to another bluetooth device in android
Need help in Android Studio: Text alignment
Launching app in another device gives Multiple dex files define error
Android Firebase Recycler view UI inside onDataChange()
Does Android package name matters for search in Google Play?
MediaPlayer listing songs in custom listview
Android Retrofit 2 issue in adapter
Remove old entry from ListView when Firebase is updated
Android NFC tag with URL opening browser, not my app
Init fragments for FragmentPagerAdapter when its parent visibility is set to GONE/INVISIBLE
check whether the youtube video exists or not in Android YoutubePlayer

Categories

HOME
embedded
search
spark-streaming
twig
pascal
knitr
nuget
simulink
google-apps
pyqt4
pkcs#11
g++
appcelerator-studio
windows-ce
radgridview
onedrive-api
sigma.js
nim
microsoft-ocr
springfox
angular-routing
object-storage
gmock
strongname
delimiter
fractions
tpm
calculation
send
mockjax
sql-server-2000
android-sugarorm
linkedhashmap
hunspell
searchkit
sessionstorage
amazon-ses
verifiable-c
diacritics
opensmpp
apache-stanbol
tasm
doc
dbnull
apache-spark-dataset
dapper-simplecrud
openblas
zenhub
aquamacs
wpas
cup
check-mk
mathcad
rsa-archer-grc
testrail
cronexpression
angular2-testing
meteor-packages
greatest-n-per-group
udpclient
shopping
google-query-language
project-organization
hadoop-partitioning
upx
grass
relativelayout
iokit
dllimport
xenomai
morton-number
baasbox
ocra
machine-instruction
genymotion-call
parallel-testing
buffering
dsym
menubar
scrypt
hidapi
unit-of-work
cffile
asdf
epiceditor
device-width
sentestingkit
cakephp-1.2
listitem
database-create
usertype
isa-swizzling
cgimage
pylucene
dataform
nhprof
objective-j
addchild
zend-rest
spread
unmanagedresources
cardspace

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