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
0
votes
1 answer

carrierwave recreate_versions! corrupts original image

Love carrierwave. When running the recreate_version! the quality of ORIGINAL image is dramatically reduced/corrupted. I need to use carrierwave's recreate_version! to add a new "mobile" version to an existing Photo model via the mount_uploader…
0
votes
2 answers

ProgressBar setProgress() not working after Activity recreate()

I have a horizontal ProgressBar which is displaying the remaining life in a game. When the life is 0 (ProgressBar progress is 0) the game ends and there is a button RESTART which calls to activity.recreate();. The progress must be shown full again…
0
votes
1 answer

Cannot resolve method 'recreate()' in fragment

recreate() cant be resolved in fragment activity. mBuilder.setSingleChoiceItems(listItems, -1, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int i) { if( i==0 ) …
Saeedeh
  • 297
  • 1
  • 4
  • 21
0
votes
0 answers

The recreate() method causes an activity to be automatically (recreated and) paused on emulator api level 16...24

Suppose you have two activities: A (launcher) and B. Activity A has a button, when you press it, activity B is started for result. When the user presses the back key, in the method onActivityResult() of activity A, put a call to the method…
berlusca
  • 119
  • 2
  • 9
0
votes
1 answer

TypeError: too many data entries

i am trying to recreate a picture. I take a picture edging it and save it. after i made it grayscale and save it. Found the common pixels of the two images and I am trying to recreate again the picture and i get this error. It is a picture of a road…
0
votes
1 answer

kubernetes node affinity require pod restart even the pod has meet the rule in node affinity

I have a running pod (pod-1), deployed from a k8s deployment (deploy-1), on k8s node-1. Someday, I want to patch node affinity to this deployment. For example, the target node must have label 'data=allowed'. My steps: Add label 'data=allowed' to…
0
votes
2 answers

Creating new array from looping another array

I need to tidy up an array. And gather all similar information together. This is going to be a huge order that I'm bringing to the table, however, it's well beyond my skill set and I've been trying to fix it for 3 days. The message comes from a…
JS1986
  • 1,920
  • 4
  • 29
  • 50
0
votes
1 answer

Recreateable random number in php

I need to get a "random" number (0-9) based on a string, so that it can be recreated. My solution was to use SHA512 and take the 2nd number, like this: $random = filter_var(hash('sha512', 'STRING COMES HERE'), FILTER_SANITIZE_NUMBER_INT)[1]; I want…
FriedChicken
  • 59
  • 1
  • 7
0
votes
2 answers

Recreate activity passing hardcoded null instance state

I am making a puzzle game and every time the user completes the puzzle, a recreate button appears which is simply calling the recreate() method to restart the puzzle activity. I override onSaveInstanceState because i want to save the image selected…
0
votes
1 answer

how to prevent loss of data on calling recreate activity

I have to change Theme of activity when users feels like changing it. For that,I have to call recreate() after setting theme to activate the Theme. But my Activity gets data from web and displays to user in a Recycler view. every time the theme…
Vihaari Varma
  • 155
  • 11
0
votes
2 answers

Refresh Android Activity from outside mainActivity (Adapter class)

I searched over it and found two results: Call 1 recreate(); 2 startActivity(getIntent()); finish(); But I want to refresh the activity NOT from within the activity. I have more than one fragments, each fragment has listViews which has buttons. My…
Saurabh Mhase
  • 108
  • 1
  • 10
0
votes
2 answers

VFP. Re-creating indexes

I would like to be able to re-create the index to a table which is part of a database. The index to the table is corrupted, so the table cannot be opened (certainly not without an error message). I would like to use the information in the database…
Andrew_46
  • 37
  • 2
  • 13
0
votes
0 answers

Problema trying to recreate synonym DUAL

In this link How to recreate public synonym "DUAL"? I've the same problem with one diference. I executed this comand: CREATE OR REPLACE PUBLIC SYNONYM "DUAL" FOR "DUAL" CREATING SO A "LOOPING CHAIN OF SYNONYMS". SO A REMOVE THE SYNONYM. NOW MY…
0
votes
1 answer

How to modify Activity's savedInstanceState so that new data is used to recreate DialogFragment?

I have a DialogFragment listing data generated at Activity.onCreate(Bundle). When the Activity is recreated on, for example, orientation change, DialogFragment is recreated using old data from previous Activity instance. DialogFragment is recreated…
0
votes
2 answers

android fragment reloading (onCreate) each time when back Button pressed

I am new in android using fragments in my Project. first time my fragment is creating then api called and get data load in fragment. here when i clicked at any item i replaced fragment by another fragment there also another api called and load data…
Dinesh
  • 482
  • 9
  • 20
1 2 3
8 9