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

Location Service doesn't work in fragment
How to achieve this layout on tablet?
Android incorrect behavior of child CheckBox
Why tablayout and actionbar put space in fragment in android?
android custom toolbar how to set back button be white?
Android: How to change the gravity of an ImageButton placed into a dynamically created layouts
Android app showing info based on the location
Unable to enter keyboard input into android avd java app when naming new device. (Mavericks, Homebrew)
Can I send an SMS from a service?
Android-Sending sms from android application
Symfony doesn't validate on iphone
Change textsize of summary of a preference
Android drag action drag_ended, errors
How to make a dialog with icons like the one in Whatsapp?
Why normal Java socket programming does not work in Android?
Getting Exception javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found

Categories

HOME
time-complexity
youtube-data-api-v3
saml-2.0
opendj
access
database-normalization
soa
emscripten
settings
boto3
recordrtc
p2p
distribution
mod-security
mxgraph
ycsb
plink
symbol
altera
azure-powershell
chargify
jmp
sse
springfox
gulp-watch
object-storage
comparator
pic32
licensing
corpus
ms-access-2003
handler
ceylon
complex-numbers
hibernate-validator
fstream
biztalk-rule-engine
twos-complement
pop3
apns-php
setup.py
preloader
subclipse
chronicle-map
outputcache
http-request
knime
plan-9
puredata
getchar
dbcontext
payara-micro
pair-programming
java-bytecode-asm
compiler-design
java-6
donations
pytables
reporting-services-2012
webjars
xcode-server
spring-cloud-feign
rspec2
embedding
mediametadataretriever
tracker-enabled-dbcontext
lz77
pushbots
highland.js
atan2
jdi
jdk1.7
liquid-layout
skspritenode
alloy-ui
diff3
user-permissions
bcache
infosphere-spl
theos
trdion2011
named-parameters
rcaller
multiautocompletetextview
windows-embedded-standard
kendo-dataviz
modular
cnf
nevron
octal
fb.ui
asplinkbutton
faye
adobe-media-server
cross-database
convention
procedures
tournament
xui
resharper-6.0
globals
nstokenfield
request-headers
alsb
fault-tolerance
flvplayback
soappy

Resources

Encrypt Message