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

How to set Content-Type on HttpURLConnection in Android? [duplicate]
Connecting to online database in Android app [closed]
Android EditText value constraint [duplicate]
Save the application data in sqllite when offline and send all the saved data to server
NPE in Custom list
Android: Boolean
Action Bar Button won't respond to Touch events
Android - how to launch the device “file system” programmatically?
Audio play sound Button problems in android
ExpandableListView child's radio button
Repeat Bitmap in drawBitmap
How to read a file from src/instrumentTest/resources directory in Android?
Using a fragment in ViewPager
Android proper wearkReference Use
Override back button with moveTaskToBack in Android 4.4.2 KitKat
Application disappeared from Google Play after changing title

Categories

HOME
go
ggplot2
nvd3.js
rdbms
character-encoding
battery
fftw
jwplayer
static-site
soa
simulink
babeljs
mvc5
spin
mel
distribution
watson-conversation
mod-security
endpoint
onedrive-api
android-intent
gruntfile
easyphp
video-editing
smartclient
topology
springfox
jquery-ias
dataflow-diagram
parcelable
displaytag
highstock
interpreter
gmock
interbase
pylons
jasmine-node
has-and-belongs-to-many
angular-translate
quantlib
twiml
left-join
kodi
dumpbin
r-grid
instantiation
indy10
navigator
mongoose-schema
spring-mvc-test
doc
levenshtein-distance
rfc3339
lampp
dbcontext
corruption
truezip
filehandle
type-theory
py2neo
swingworker
restore
actor-platform
ng-grid
refinerycms
gcloud-ruby
cda
fink
database-relations
halcon
nio2
libvlc
dynamics-nav-2016
computer-architecture
include-guards
video-player
binomial-theorem
toolkit
uncompress
sha512
node-serialport
delayed-execution
webmatrix-3
sip-server
raygun
rcaller
synapse
gwt-openlayers
ie8-compatibility-mode
rolify
merb
patricia-trie
fragmenttransaction
sentestingkit
os.system
paginator
update-statement
cgbitmapcontextcreate
codebase
mtu
load-time
silent
hbm2java
tabpanel
echo3
glui

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