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

Can I send life to a friend using facebook-unity sdk on mobile devices?
ExpandableListView getSelectedId return -1
Switch to my app from system overlay view
How can I use checkboxes and ExpandableListView?
Delete data from firebase recycler view adapter without deleting in the database
Stream M3u url in Android
How to get same childfragments(having recyclerview) instance in all the fragments of viewpager?
What is Dagger? And why we use it? [closed]
Adding init script to reboot android marshmallow tablet when it's booted with usb charging
java.lang.NoClassDefFoundError: org.apache.poi.hssf.usermodel.HSSFWorkbook
Firebase real time database offline mode is not working properly in Moto e 2gen device
Retrofit2 Replacing query parameters
Is it possible to show progress bar when download via Retrofit 2 Asynchronous?
How to create a view of different number of columns for every row using RecyclerView
get value of TextView on item click inside a Recycler View?
'User not found exception' while accessing AWS API gateway

Categories

HOME
grok
scikit-learn
design-patterns
webdriver
css3
ns-3
sitecore
shiro
dojo
emscripten
nfs
character
augeas
rtf
openbugs
tput
favicon
selectize.js
sencha-touch
replication
rubymotion
cgbitmapcontext
gmock
constexpr
cognos-bi
slacktextviewcontroller
roblox
engine.io
protege4
flatmap
metawidget
tcc
signal-strength
procfile
mesosphere
openal
openrasta
posixct
opengl-4
git-flow
offline.js
objectscript
pacemaker
neon
riot
database-relations
pushbots
exim4
relativelayout
concurrentmodification
custom-errors
assertion
flock
doctype
linked-tables
keyup
diff3
public-html
delayed-execution
webmatrix-3
punycode
human-computer-interface
universal-image-loader
buffering
decoupling
twitter-bootstrap-rails
sbcl
ice-cube
mvc-editor-templates
flex++
mysql-error-2013
android-sdk-2.3
vfs
veracity
os.system
fusefabric
database-create
relative
landscape-portrait
matlab-load
google-ajax-api
creole
codebase
undefined-index
maven-1
web-garden
cuda.net
escrow

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