Questions tagged [savestate]

A bundle of state variables. Often used to sore and retrieve the application state upon a device rotation.

A bundle of state variables. Often used to sore and retrieve the application state upon a device rotation.

363 questions
7
votes
6 answers

Save Windows Form Size

I'm developing a piece in VB.NET. Inside my primary form, I'm creating a new form to use as a dialog. I was wondering if there was a way to, upon the close of the new dialog, save it's size settings for each user (probably in a file on their…
Joe Morgan
  • 1,761
  • 6
  • 20
  • 29
7
votes
1 answer

How to save&load a snapshot of an Android app state?

Before reading this, note that I'm not talking about capturing the screen. Motivation Many times, in order to test apps, we need to go over many activities (including a loading/splash screen) till we reach the one we've just updated in order to test…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
7
votes
2 answers

Restore State after process is killed

I have implemented onRestoreInstanceState and onSaveInstanceState. They both work successfully when the app is minimized (by pressing the home button, or another activity is in the foreground). However, when I minimize the app and the kill the…
Rilcon42
  • 9,584
  • 18
  • 83
  • 167
6
votes
1 answer

How could I copy the RAM of a running application, save it, and reload it into RAM later on?

I play modded Minecraft a fair bit. One downside to that is it takes a lot of time for all the mods to compile whenever I launch Minecraft. It can take around 15 minutes or so, which is too much time in my opinion. When a computer is running…
Laff70
  • 191
  • 4
6
votes
2 answers

onSavedInstanceState vs. SharedPreferences

I have 7 activites all with back and forth navigation buttons between the rest; activites consist of editTexts, Spinners, textViews, TimePickers, DatePickers, and checkboxes. I want all UI to be present and saved through navigation of an application…
SLYtiger
  • 81
  • 1
  • 6
6
votes
3 answers

how can i save the state of my webview when changing orientation using a webviewfragment

I have a small webView in one of my layouts that act as a news feed from my website.Every time I changed rotation it would reload the web page. so I edited the code to include a on config change and on restore state.Then adjusted my android…
Mark Harrop
  • 192
  • 1
  • 14
6
votes
1 answer

Restoring view SavedState throws ClassNotFoundException when unmarshalling parent view SavedState

I have 2 classes ParentClass and ChildClass: ParentClass is a subclass of RelativeLayout which saves state using onSaveInstanceState() / onRestoreInstanceState() with following code: @Override protected Parcelable onSaveInstanceState() { …
nemezis
  • 536
  • 1
  • 6
  • 21
6
votes
1 answer

RecyclerView save position on device orientation change

In my App I have a RecyclerView connected with an adapter but everytime my device changes from landscape to portrait or something else, the view get reloaded and I'll get to the top again. I want to save my scroll position to the last item I…
6
votes
3 answers

Save markers on Android google maps v2

I am using Android Google maps v2 API and have it set up to add markers on long click. I need a way to save these markers and reload them when the app resumes again. What will be the best way to do this? Please help Currently I add markers as…
6
votes
5 answers

Pickling unpicklable objects

I am making a drawing program with pygame in which I want to give the user an option of saving the exact state of the program and then reloading it at a later time. At this point I save a copy of my globals dict and then iterate through, pickling…
hedgehogrider
  • 1,168
  • 2
  • 14
  • 22
6
votes
2 answers

Android fragment not saving state

I recently converted my app from an activity based app to a fragment based app. It's a score keeping app, and I was easily able to save and restore score when it was an activity. However, that doesn't seem to be working as a fragment. Here's my…
The Holo Dev
  • 1,016
  • 3
  • 12
  • 22
6
votes
5 answers

Android - Why is using onSaveInsanceState() to save a bitmap object not being called?

I'm making a simple drawing application. I want to be able to save the user's drawing on the screen when the device orientation changes. This only happens in the main activity. I read that if the orientation changes, then the activity is destroyed…
Shahar
  • 2,269
  • 1
  • 27
  • 34
6
votes
4 answers

jQuery Datatable, saving state of the table like pagination, search etc

So I am using this attribute "bStateSave": true to save the state of jQuery Datatable but for some reason it doesn't work for me. It doesn't save search results and pagination etc when I do the page refresh. Is there some other parameter that needs…
user1006072
  • 953
  • 5
  • 20
  • 29
5
votes
1 answer

How to use popUpToSaveState and restoreState to save and keep state in Navigation Component Android Kotlin?

I am using Navigation Component to handle navigations, but when use popBackStack() or onBackPressed() to back to previous fragment my onViewCreated call again in fragment with api and set up views. Since Navigation Component 2.4 unveiled new…
reza_khalafi
  • 6,230
  • 7
  • 56
  • 82
5
votes
1 answer

android saving game state

I'm developing a game and i've ran into some questions about saving and resuming the game. Let's say i have 10 animated sprites drawn every frame (which move side to side) and everytime i press the home button or back button and then go back to my…
Jernej
  • 51
  • 2
1
2
3
24 25