Questions tagged [recreate]

recreate() is an Android SDK API method available from API lvl 11 (Android 3.0) that causes the calling Activity to be destroyed and recreated.

Official method documentation:

Cause this Activity to be recreated with a new instance. This results in essentially the same flow as when the Activity is created due to a configuration change -- the current instance will go through its lifecycle to onDestroy() and a new instance then created after it.

For more information about Android Activity lifecycle see http://developer.android.com/reference/android/app/Activity.html

122 questions
1
vote
0 answers

PHP create file from byte array from MySQL

I have a mysql dtabase which contains a byte[] from a file in a BLOB. Now I want to read the byte array from the database and output the file. So: How can I get a byte[] from mysql in PHP and How can I output a file from a byte[] in PHP?
MinecraftShamrock
  • 3,504
  • 2
  • 25
  • 44
1
vote
3 answers

Maintain UpDown-Associate connection while recreating the associate

I have an TUpDown control whose Associate is set to an instance of a TEdit subclass. The edit class calls RecreateWnd in its overriden DoEnter method. Unfortunately this kills the buddy connection at the API level which leads to strange behavior…
Uli Gerhardt
  • 13,748
  • 1
  • 45
  • 83
1
vote
3 answers

Recreate project from .jar file

Is there any chance, to recreate a (netbeans-)project from a .jar file? Becuase I trusted some silly cryption-software that corrupt's my file. Is their any suggestion or solution? I already extracted the .jar file with terminal commands 'jar xf…
Christian 'fuzi' Orgler
  • 1,682
  • 8
  • 27
  • 51
1
vote
1 answer

Android recreate() functions in api 7

I recently programmed a game on api 14. However i realized that not all my friends are yet upgraded there android phones, so i decided to program it on api 7. However when i changed the properties from eclipse, there was a function (recreate()) that…
1
vote
1 answer

Android MediaPlayer - Unwanted new instance created whenever activity is instantiated

I've got a MediaPlayer inside an activity which is called whenever a user clicks on a specific song. Once the MediaPlayer is playing, if the user clicks back, they can select another song. The problem is that upon selection of a second song, the…
user1352742
0
votes
6 answers

Use image's raw text and display it

You know when you open up an image in notepad or a text editor, you get a lot of random illegible text that looks like a bunch of foreign letters. For instance, this image: results in: ‰PNG IHDR szzô gAMA ¯È7Šé tEXtSoftware Adobe…
H Bellamy
  • 22,405
  • 23
  • 76
  • 114
0
votes
1 answer

Android: Force recreation of dialog

I am using the android dateslider custom dialog class in order to let the user edit the date for several different rows of a table. The dateslider lets you limit the user to only select dates between a minimum date and maximum date that you can…
Max Mumford
  • 2,482
  • 5
  • 28
  • 40
0
votes
1 answer

Kotlin app using recreate() function Error:"java.lang.IllegalStateException: Must be called from main thread"

I get the error"java.lang.IllegalStateException: Must be called from main thread" when using the "recreate()" function to refresh my activity in Kotlin-Android Studio. What is causing the error? Edit: I solved the problem by running the following…
Swaghaug
  • 1
  • 2
0
votes
1 answer

Restore or some recreate a tablespace to another new tablespace on the side or empty db with only

On db2 LUW LInux: Is there a possibility to recreate tablespace somewhere aside pointing to a different tablespace name created only for the purpose of unloading data from the table. I'd like to be able to extract data or restore data from a damaged…
bartezzzz
  • 1
  • 1
0
votes
1 answer

recreate activity with animation not work

Change all my activity to ViewModel to keep the UI data because I need to recreate the activity when switching to dark mode or applying a theme. I created the fade in and fade out animations to add them, but I can't get it. I already…
Chuy Porras
  • 125
  • 1
  • 6
0
votes
2 answers

Is it possible to create new containers on error?

Quick question: Is it possible to create new containers on error? I know that when a container exits we can restart it (given the correct parameter) but instead of a restart I would like to recreate because I don’t want to maintain the state that…
Manuel
  • 17
  • 1
  • 5
0
votes
1 answer

Is there a way to recreate the "parent" class from a static class?

I am working on an app where I am trying to change the language inside the app with a preference screen and using a preferenceList. I am able to listen to the choices, but I can't seem to recreate the "parent" class. Everywhere I changed the…
Jacob
  • 1
  • 1
0
votes
3 answers

How do I recreate the activity only once after opening the application?

How do I recreate the activity only once after opening the application? I tried to do this, but it didn't work. Endlessly recreate() refreshLang() in onCreate private fun refreshLang() { PreferenceManager.getDefaultSharedPreferences(this).apply…
Hartaithan.
  • 326
  • 3
  • 14
0
votes
0 answers

How to recreate/Restart application when Android app language is changed?

I have created an application which asks for user preferred language in the Loginfragment .I need to kill and restart the app after setting the language. I tried using recreate but it results in the following error android.view.WindowLeaked:…
segfault404
  • 281
  • 1
  • 11
0
votes
0 answers

How can I change the language of the application within the application?

everyone! I have been making a small application with my friend, and we have a problem. My task in this 'making' is changing the application's language by choosing the language in the spinner and pressing the 'save' button, which must change the…
user12971295
1 2 3
8 9