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

system.nullreferenceexception object reference not set to an instance
Viewing database of an app stored/installed on the device in android
Run Broadcast at specific time
Arraylist display selected listview to textview
Call service method from activity
How to change programmatically the primary color in Android L
Implementing PreferenceFragment?
3G mobile data carrier shows different website
Facebook android app permission: ask for get user profile picture
send data from ArrayList<String> to String Array (Android)
How to store multiple checkbox values in android?
On button click animation must be triggered
how to define default view in android after creating new class?
No Activity found to handle Intent` { act=android.intent.action.DELETE dat=sms:
Android - Set the space between GridLayout children programatically?
Custom Slider in Infowindow not getting focus - Android Google Map v2

Categories

HOME
google-app-engine
cygwin
microsoftgraph
jpa
hyperlink
hessian
r-googlesheets
google-apps
dojo
polling
jax-ws
rcloud
openstreetmap
google-chrome-app
endeca
java.util.logging
openbugs
supervisor
fileserver
digital-signature
mongoid6
perlbrew
mount
fragment-backstack
mat
apktool
realm-mobile-platform
ntp
userdefaults
sql-server-2000
turfjs
login-script
modalviewcontroller
roblox
xajax
timing
railstutorial.org
c9.io
congestion-control
file-sharing
flask-login
procfile
httrack
configurationmanager
identification
openblas
remedy
skin
dt
seq
py2neo
cd-burning
renaming
sandcastle
taocp
stax
ziparchive
jboss-tools
google-query-language
deep
tracker-enabled-dbcontext
turbo-prolog
concept-insights
assertion
dynatree
rpart
atoi
formview
kissfft
koala
qscrollarea
conditionaltagsupport
scriptaculous
isqlquery
jeromq
swfobject
android-sdk-2.3
intersect
listitem
subproject
multiplexing
apache-commons-dbutils
node-redis
screen-size
fsevents
android-holo-everywhere
creole
office-2007
lxr
unmanagedresources

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