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

Modify columns width from code android
YandexSpeechKit Recognizer with voice recording
Android - ClassNotFoundException for library xmlns
Unable to resume activity error after end video playback?
Cannot Access Resource from Another Class
Android MenuItemCompat.getActionView always returns null
android handler delay for loop
Unable to start service Intent { flg=0x4 cmp=com.org.sample/.TipActivity (has extras) } U=0: not found
Android Camera Pinch Zoom
Ripple animation effect over MapView
Toast: Difference between “this” and “getApplicationContext()”?
Get Post Comments Using HttpsUrlConnection
This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR
build.gradle repository merge
Passing argument to fragment
Android, cannot re-open already closed connection for query

Categories

HOME
django
xml
azure-stream-analytics
localization
apache-flink
phpmyadmin
apiblueprint
nested-if
jetty
code-coverage
iis-6
pkcs#11
joomla3.0
discrete-mathematics
sendgrid-api-v3
commonjs
siddhi
jsonpath
symmetricds
heat
package-managers
powershell-v5.0
pchart
froala
dapper-extensions
interbase
datastax-enterprise-graph
vex
sqsh
nsurl
complex-numbers
powershell-ise
playstation-portable
hunspell
fossil
pop3
filesystemwatcher
apns-php
health-monitoring
spring-mvc-test
avcapturedevice
wc
sonarlint-eclipse
dbcontext
identification
mongotemplate
trojan
aquamacs
git-flow
mach-o
flyout
swingworker
filenet
renaming
juice-ui
hadoop-2.7.2
webjars
flex4.6
qiime
bizagi
nullable
piracy-prevention
oracle-spatial
intel-c++
snackbar
code-documentation
qtwebengine
webmatrix-3
android-vibration
structuremap3
cocos3d
paw
mobility
verold
android-usb
breakout
poker
patricia-trie
midlet
jquery-blockui
httponly
window-decoration
failing-tests
jqote
msr
codebase
undefined-index
tabpanel
pagemethods
django-piston
echo3
dojo-dnd
application-planning

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