android


ImageView not keeping state when screen rotates in Android


Consider a layout has one EditText and one Image View. We type something in EditText and select an image from Gallery and attach the image to ImageView. After that we rotate the screen, the imageview will lose its view but the EditText will keep its state.
Use below line in your manifest file of activity which has imageview.
android:configChanges="orientation"
android:screenOrientation="sensor"

Related Links

Send two strings from fragment to fragment
How to change view after click?
How to modify the bar width in MPAndroidChart BarChart?
ActionToggle image not showing
Custom circular ProgressBar with image in center [closed]
How to set border and rotate a bitmap image in Android?
AutocompleteTextView not properly working listview in android
Throwing OutOfMemoryError "Failed to allocate a 31961100 byte allocation with 4194304 free bytes and 27MB until OOM
how to set vertical scroll bar for relative layout
Create a value observer and update textview/list view from any activity
Nested RecyclerView throws NPE
Android ImageView, maintain aspect ratio and crop top of image
Android LocationServices lastKnownPosition
Reuse RxJava stream from a remote API
Listening for tweet with Android app
App comparison using androguard

Categories

HOME
url-redirection
porting
ecmascript-6
datastore
mysql-workbench
xbee
interpolation
zip
jetty
mapbox
jquery-ui
crystal-reports-2013
extjs4.2
p2p
okhttp
syntaxnet
commonjs
alamofire
tput
android-intent
dynamic-sql
dreamweaver
asp.net-core-webapi
simpleitk
poedit
game-theory
amazon-quicksight
inversion-of-control
uitapgesturerecognizer
twiml
gitlab-api
memory-address
card.io
contacts
android-maps-extensions
hunspell
yowsup
roblox
docfx
modernizr
verifiable-c
tasm
attributeerror
rfc3339
flask-restful
dynamic-linq
term
fclose
identification
aquamacs
offline.js
android-instrumentation
smartfoxserver
stax
seek
greatest-n-per-group
scaffolding
dup
freepbx
query-by-example
false-sharing
kendo-upload
user-management
asyncdisplaykit
atan2
dllimport
file-move
slash
atoi
viola-jones
sql-server-data-tools
skspritenode
mmwormhole
public-html
mass-assignment
mruby
cocos3d
insight.database
with-statement
personalization
gnumeric
file-not-found
actiondispatch
listitem
inkcanvas
ikimagebrowserview
user-tracking
google-floodlight
jqote
umra
quotation-marks
nhprof
cfwindow
localizable.strings

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