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

how can telephony manager conditionally listen to multiple PhoneStateListener's events?
Remove last outgoing call from Callog programatically in android
Can android read the serial number of the USB charger
Xamarin PCLStorage package: What is the root folder this PCLStorage reference to
CheckBox set checked programmatically without animating
Can't find method on extension class:
Android GridView not showing any images
Nearby URL Notifications appear in Discoveries, but no notification icon
Using NEON code in Android Studio
Navigating from Activity A->B->C - How to pass data from C to A in onBackPressed()?
How much time Admob need to index app from Google Play?
Unity3D compiling APK for Samsung Gear VR: Failed to re-package resources
Building Android App with Jenkins
Android:gradle I am unable to publish aar to local repository
Custom color kit by Style
android ImageView in RecyclerView loads the same image in random positions

Categories

HOME
httparty
search
string
amp-html
mjml
apache-spark-mllib
yahoo-finance
requirements
error-handling
javacc
hugo
mvc5
discrete-mathematics
arangodb
project
gson
ipmitool
selenium-ide
azure-iot-hub
jersey-1.0
symfony-console
nodemcu
squashfs
angular-routing
displaytag
onload
interbase
amazon-quicksight
has-and-belongs-to-many
paragraph
erb
android-sugarorm
nested-lists
python-import
numpy-broadcasting
openerp-7
reactivekit
tex
release
css-position
contract
angular-http
fwrite
linter
automapper-5
cnc
spring-integration-sftp
datamaps
remedy
corruption
reindex
amq
wpas
colorbar
headless
type-theory
lsyncd
materialized-path-pattern
cubism.js
flex-monkey
builtins
signalr.client
model-associations
observablecollection
findfirst
false-sharing
realsense
cycle2
crouton-os
spring-retry
morton-number
intel-c++
slash
viola-jones
haskell-warp
jsvc
avahi
openbabel
variadic-templates
contrast
metatrader5
genymotion-call
tweenlite
mdichild
dot42
extjs2
websphere-esb
stacky
intersect
onmousemove
vfs
garbage
luabind
exponentiation
webdev.webserver
easyb
interprocess
scrubyt

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