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

Sequence animation freezing before start in Android
Class 'android.support.v4.widget.DrawerLayout' not found (SDK Level 25+)
Android IME's touch events are always limited to the window dimens
Add Image To ListAdapter
Can I use SVG for app icon and splash screen? for both ios and android
Admobadapter customize ad layout
Google maps API v2 and saving maps for offline use android
Android custom View and ViewAnimator
onPlayFromSearch() and local language
EditText filter by using SimpleAdapter
Android : Filterable not working on text clear
How to disable fleksy keyboard auto-complete programmatically
Step counter in Android
Android- programmatically restrict which apps can be run
Why the Softkeyboard example doesn't work?
Android : Why upgrading the app re-creates my database?

Categories

HOME
django
assembly
google-cloud-platform
ecmascript-6
gpu
mysql-workbench
numbers
parameters
gembox-spreadsheet
maxscript
google-admin-sdk
nfs
distribution
opengl-es-3.0
shared-libraries
renjin
enterprise-architect
glyphicons
null-pointer
simpleitk
backpack-for-laravel
react-toolbox
pimcore
zxing
jquery-callback
xunit
google-cloud-print
has-and-belongs-to-many
outliers
tpm
cppreference
uitapgesturerecognizer
sql-server-2000
testbed
gnat-gps
roblox
node-mssql
odroid
railstutorial.org
loading
jvmti
laravel-elixir
subclipse
congestion-control
bindingnavigator
clang++
wcftestclient
vugen
twilio-click-to-call
arq
stdmap
qtranslate
tinkerpop
colorbar
headless
ngmaterial
quicktime
jtree
vibrate
javafx-css
pytables
redbeard-ios
seek
nikeplus-api
i386
freepbx
cda
fink
crouton-os
sapi
xenomai
finalbuilder
dulwich
baasbox
nutiteq
entity-framework-4.3
cryptographichashfunction
nodelist
mruby
android-vibration
universal-image-loader
strawberry-perl
grails-domain-class
android-audiorecord
openargs
windows-embedded-standard
rfc5322
model-driven-development
joomla-template
cascadingdropdown
web-notifications
robotlegs
curb
rmiregistry
ikimagebrowserview
automationelement
uipagecontrol
django-paypal
cruisecontrol.rb
dsl-tools
appliance
great-circle

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile