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

get data of listview item on click
Application crashes when I use the path of ndk in the build.gradle in Android Studio 2.3.1
Android Developement: Bluetooth Low Emission Advertisement is “Not Supported” on compatible devices
Adding a Contact in Android with last name
Dagger2 “test” class generated but not able to import it
Ionic2 navbar with icons left and right in android
Android:Can we popBackStack() the fragments from fragmentmanager stack list after Activity state save onSaveInstanceState(Bundle outState)
how to create expandable listview with cursortreeadapter?
How to application uninstall time call Web API in Android?
vlc in android studio with ffmpeg in linux
Load an image from assets folder using openGL and show it into the app
Android - Add bottom navigation view dynamically
How to get Images from Cursor in android?
How to know connectable Wi-Fi list on android?
One Custom Alert Dialog for two activities
Not able to set Onclicklistener on a editext present in a popup

Categories

HOME
windows
sonarqube
cygwin
phpword
amp-html
hessian
jsf-2.2
socket.io
shiro
permissions
vxml
pearson-correlation
crystal-lang
pattern-matching
owin
siddhi
automatic-ref-counting
html5-appcache
nodemcu
articulate-storyline
ember-cli
joptionpane
mongoid6
roundup
xcode-ui-testing
licensing
has-and-belongs-to-many
linked-data
tpm
nsurl
corenlp-server
volatile
quickfixj
rselenium
spring-security4
mailkit
jett
dynamic-jasper
getpixel
hibernate-search
imx6
sim-toolkit
google-earth-engine
nohup
verifiable-c
demo
urlsession
hackintosh
tasm
parser-generator
install.packages
ssrs-2014
knime
automapper-5
serde
user-defined-fields
fclose
insight
flyout
testrail
materialized-path-pattern
segment-io
uicolor
greatest-n-per-group
macaulay2
lean
kango-framework
stream-processing
lua-telegram-bot
findfirst
toast
jaunt-api
decimalformat
poppler
opserver
page.js
.bash-profile
canalyzer
avahi
matlab-deployment
grouping-sets
exceldatareader
paste
multiautocompletetextview
ie8-compatibility-mode
unit-of-work
web-notifications
extconf.rb
inkcanvas
htdocs
listactivity
cdonts
globals
object-database
office-2007
message-passing
spread
build-environment
web-application-project
visualj#
pbcopy
leader

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile