android


How to use saved instance state and restore instance state?


I have an application with a tab activity. The activity hosts 2 activities with a list of items. I have implemented checkboxes to each of the items also. On orientation change, I have set the tab activity to be oriented to the left hand side of the screen. ie. the tab activity and the child activity are recreated. If i press the menu button to display the check boxes and checks a few items and if the orientation is changed, the checked items will not be shown in the check boxes. I handled the display of checkboxes while orientation change using the SharedPreferences.
I am putting the checked items to an arraylist. the arraylist cannot be transacted through the SharedPrefereces.
I want the checked items to remain checked on orientation change.
Does anyone have any clue?
You may store this arraylist in the host Activity through a interface like this: Custom event listener on Android app . But if there aren't so many checkboxes I would divide arraylist into simple kay-value preferences and store them as a Shared Preferences.

Related Links

TextView selection after EditText has been focused
Xamarin project broken on update CardView package
Descriptive Build Variant names in Android Studio
navigation drawer header is over the content?
Instrumental unit testing of activity with FirebaseAuth
ArcGIS Android Studio Falied to resolve: com.esri.arcgis.android:arcgis-android:10.2.8-1
Table is present in the database still its shows no such table
Android image intent crash
Get active page in ViewPager and update content
Asynctask equal null when change to second activity and comeback first activity
Can't access some DOM elements using Jsoup
How to store this list view?
Circular image: alternative to setClipToOutline for pre 21
Not seeing files that are store on the Android device using cordova -file plugin
Cordova how to add a Plugin right?
Android: Error converting bytecode to dex after adding firebase dependencies

Categories

HOME
httparty
formal-languages
datastore
jmx
youtube-data-api-v3
numbers
pascal
apiblueprint
jsf-2.2
requirements
bing-maps
google-chrome-app
jxl
automatic-ref-counting
endpoint
gkturnbasedmatch
pyramid
sar
inno-download-plugin
php-mysqlidb
pic32
jasmine-node
amazon-quicksight
spotipy
errbot
carrierwave
nsurl
mockjax
testbed
gnat-gps
sendbird
installscript
batching
numpy-broadcasting
searchkit
raft
magento-1.9.2.4
node-mssql
gdata
plaintext
microsoft-metro
claims
clang++
phpdbg
nanoc
linter
openrasta
activeperl
x-ray
stdmap
truezip
edit
headless
arules
gpg-signature
google-photos
javafx-css
juice-ui
slackware
angular2-testing
segment-io
nikeplus-api
jboss-tools
lean
freepbx
lua-telegram-bot
nss
php-socket
ikiwiki
nupic
zen-cart
google-refine
fits
openbabel
adehabitathr
theos
android-cookiemanager
webfinger
cocos3d
formview
memset
maven-scm
process-explorer
octal
superscrollorama
cascadingdropdown
fragmenttransaction
saleslogix
faye
jquery-tools
timthumb
inline-formset
diagrams
timertask
delimited-text
updatesourcetrigger
drupal-fivestar
binomial-heap
cfwindow
murmurhash
django-piston
skype4java
cldc
entitykey
business-model

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