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

Titanium download and save a file locally and show it in an ImageView
Passing params from android to Web Api
[Android search widget]How to hide the close button in search view by default?
run “adb shell” programmatically
java.lang.RuntimeException: Parcel android.os.Parcel#425e3308: Unmarshalling unknown type code 7536743 at offset 208
DialogFragment with negative button
Extending the app from the Jellybean version to the Kitkat for SMS abort broadcast
How can I connect two Activities to the same service?
BubbleChart and BarChart in CombinedXYChart throws Exception
LocationManager giving 2 different values for Lat and Long for same location
Couldn't create multiple tables in SQLite
Opening external links inside the app
Cannot add logo in ActionBar, Android API < 11
How to make intent chooser for camera or gallery application in android like whatsapp editprofile?
Android: database issue with ContentProvider - java.lang.IllegalStateException
How to perform click/tap operation to the perticular bound/co-ordinates in python script for Android UI using appium

Categories

HOME
batch-file
cobalt
ecmascript-6
solaris
pdfbox
newrelic
static-site
zip
jetty
polling
vert.x
extjs4.2
fabric.io
github-enterprise
mautic
line
rtf
dynamic-sql
powershell-v5.0
html5-appcache
googlebot
pimcore
scriptella
tosca
froala
fragment-backstack
papaparse
pdw-file-browser
video-capture
magento-1.9.2.4
wurfl
release
unordered-map
kill
naming
snapchat
xbmc
openresty
opennms
clarifai
fclose
datamaps
tinkerpop
android-testing
dt
css-transforms
py2neo
javafx-css
omxplayer
custom-lists
preprocessor
dup
gogs
cassia
stream-processing
data-protection
jdi
batik
wso2greg
mirror
bufferedinputstream
user-permissions
actionfilterattribute
infosphere-spl
rapidsvn
browserify-shim
contrast
formview
appserver
mdichild
ignite-ui
buffering
terminate
gwt-openlayers
unit-of-work
observium
onload-event
mantle
bjyauthorize
monotouch.dialog
cakephp-1.2
listitem
josql
relative
u2netdk
mysql-error-1205
xui
socketserver
qglwidget
commerceserver2007
undefined-index
binomial-heap
message-passing
build-environment
data-mapping
silverlight-oob
wordprocessingml
complex-event-processing
cldc
dsoframer
lemmatization
online-storage
pbcopy
cardspace
netbeans6.1

Resources

Encrypt Message