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

RecyclerView - How to smooth scroll to top of item on a certain position?
ClickListener error
Send back press event to underlying activity
Android AudioRecord return twice more data on read
Google Drive folder not recognized when trashed in Android app
get data of each android.hardware.camera2 frame before it is displayed on the surfacetexture
Write cloud code in Parse to check for unique username - Android
search for services in a local wifi network
html5 video play issue in android 4.2
Not able to get the SKU details in app purchase through Google Play Store
Padding doesn't work when aligned to bottom in Relative Layout
Check file type, return url if image, else return file if pdf
In Android, what is this feature called?
how to display a animated progress before image download using Universal Image loader
coding style in Android: when should you use a style instead of inline attributes?
Display javadoc and code completion

Categories

HOME
batch-file
notepad++
flex
composite-primary-key
yandex
spring-session
mvc5
elasticsearch-5
extjs4.2
vimdiff
reactive-programming
x-cart
supervisor
endpoint
job-scheduling
replication
articulate-storyline
cgbitmapcontext
dpdk
google-api-client
windows-server-2003
syntax-highlighting
apktool
android-things
carrierwave
uitapgesturerecognizer
userdefaults
record
database-comparison
jmockit
hibernate-validator
linkedhashmap
hard-drive
dynamic-jasper
parse-tree
docfx
sql-server-ce
playframework-2.1
nohup
railstutorial.org
loading
tasm
smoothstate.js
http-request
angular-http
flask-restful
netbeans6.8
dtsearch
vugen
java-bytecode-asm
spring-data-couchbase
dt
shinobi
rocks
pytables
xcode-server
jboss-tools
avspeechsynthesizer
dbamp
invoke-sqlcmd
exim4
terracotta
fiware-monitoring
video-player
rubaxa-sortable
airbrake
code-documentation
cryptographichashfunction
ejb-2.x
execve
radiant
high-resolution
hibernate-entitymanager
http-patch
gpars
asdf
cmmi
video-codecs
web-notifications
extconf.rb
azman
gobject-introspection
denied
workflow-services
listactivity
google-ajax-api
umra
sifr
echo3
build-environment
glui

Resources

Encrypt Message