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

Android: loading files
ViewPager height-adjust with AnimateOnLayoutChanges glitches to different page
android-App not responding LineGraphSeries jjoe64
ARMv8 library not installed from .apk
Android - Problems while fetching info from sql database
tlk.io appears blank when used with webview in Android
Android : EditText focusable but without softkeyboard
Fragment transaction and backstack
Hiding FloatingAction items when you scroll to the bottom of a list?
Android App Development | Custom BaseAdapter not working
Firebase update list values
PopulateViewHolder runs once
Show ProgressDialog While populating Realm db
Sorting Objects Alphanumerically
android triggering click event manually
Android: Create a fragment with variable elements

Categories

HOME
algorithm
api
delphi-7
github-for-windows
jsf-2.2
alarm
edge
nsbundle
mips
vxml
regular-language
discrete-mathematics
java.util.logging
libc
stellar.js
supervisor
code-generation
null-pointer
dreamweaver
git-extensions
sse
swagger-2.0
oledb
gulp-watch
highstock
dynamically-generated
strongname
moses
fat
pylons
ms-access-web-app
fragment-backstack
winexe
user-defined-functions
bioinformatics
boost-asio
autodesk-designautomation
recurring-events
catch-unit-test
rselenium
code-snippets
classcastexception
carriage-return
python-import
baidu-map
numpy-broadcasting
imagenet
android-augmented-reality
demo
apollostack
uiimage
snapchat
zenhub
boxing
yii2-user
android-testing
skin
css-transforms
oozie-coordinator
structuremap4
filenet
qtplugin
flex4.6
signalr.client
scaffolding
installshield-2010
gogs
clipboard.js
mediametadataretriever
ellucian-scribe
nupic
asyncdisplaykit
libvlc
dynatree
iokit
wiredep
poppler
jdk1.7
typemock
document-repository
boost-program-options
formview
nsmenu
gii
buffering
renderer
fpdi
menubar
route-provider
traceability
video-codecs
device-width
joomla3.1
panda3d
subgraph
jdb
infobright
user-tracking
winmain
cgbitmapcontextcreate
xui
cruisecontrol.rb
object-database
opml
perl5.12
mathematical-typesetting

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