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
2 answers

Android Activity is recreated when activity from background(pause) to foreground

Hi Android professionals, I fell into a small issue about some activity life cycle. I mentioned my problem with step by step:- launch the app with app icon from home screen. Enter some data into a edit text fields in recyclerview in activity A.…
krish
  • 131
  • 1
  • 1
  • 9
1
vote
1 answer

Prevent Android from recreating already existent activity

My problem is with deeplinking to my app. To be more specific, this also only happens when trying to open a deeplink to my app from Facebook Messenger with chat heads active. Sometimes, when trying to return(not open, just return after messenger has…
Boby
  • 856
  • 7
  • 9
1
vote
1 answer

Open same fragment after activity recreate

I have fragment container activity in which I replace fragments as per operations. In one fragment I am providing options to change primary color for app. So user can change toolbar and other components tint color. but after applying theme i…
dev_kd
  • 127
  • 1
  • 11
1
vote
2 answers

Dynamically recreating controls on postback for each row of table (ASP.NET/C#)

For every row in my 'table' I am manually creating, there must be a LinkButton to delete a database row that matches a column in the table. Because no 2 controls can have the same name, I've had to use a GUID to name them so they're all…
Chris
  • 7,415
  • 21
  • 98
  • 190
1
vote
0 answers

List View items not visible after fragment view recreate

I have a listview in my project. On initial launch,my listview's data is visible.However when ever my views get recreate after coming from background after a long time,my listview's items doesn't showup. Although,data is being set in listview and…
1
vote
2 answers

Is there any way to not re-create the instance of a form when is closed and opened again?

I was debugging a simple aplication that has three forms, and I figured out that when I close a form, and then I opened again (clicking on a button that shows the respective form), the object that represents the form is created again. I think that…
Pablo De Luca
  • 795
  • 3
  • 15
  • 29
1
vote
2 answers

onResume not called after recreate in Activity

I'm calling recreate in onActivityResult of MainActivity when certain changes are made in the app settings. After recreation, onResume is not called. I'm also getting the error: E/ActivityThread: Performing pause of activity that is not…
user5759258
1
vote
1 answer

Recreation of Main Activity

I have a main Activity which contains of approximately 90 percent of my app Fragments. After user, logged in on login activity I add the main fragment on onCreate() of the Master Activity. The issue is when in SettingFragment (which is a…
1
vote
0 answers

Android Code for Refresh Button that destroys and recreates Text MediaPlayer (Hangs)!

viewPager4 Fragment Activities If I click on the Texts that play short sounds, one after another then after sometimes the mediaplayer hangs and doesn't play any sound. But if I'm able to destroy activity and recreate the same activity with refresh…
1
vote
1 answer

Re-create session scoped JSF managed bean programmatically

I'm using Mojarra 2.1.29 and have a session scoped JSF managed bean @ManagedBean @SessionScoped public class UserContext{ //staff } and a spring bean: public class UserReproducer{ private User user; public void reporoduce(){ …
user3663882
  • 6,957
  • 10
  • 51
  • 92
1
vote
0 answers

how to recreate view which is one of layout children

I have tablelayout which is one of children of my mainLayout. My tablelayout have something about 50 cells. I fill some cells which depends on data taken from server. After clicking button put new data to this table, and here is the problem. Is…
MyWay
  • 1,011
  • 2
  • 14
  • 35
1
vote
1 answer

Can I recreate the source code and solution files for an ASP.NET website?

I have a client that had an ASP.net web-forms website built for him. He is not able to contact the original developer, but he would like to make some changes to the website (adding pages and changing existing ones). I have the production files…
1
vote
3 answers

Using native Win 7 batch methods to remotely recreate a users profile?

I made a simple batch for XP that our team used to recreate XP profiles in a corporate environment but we have since moved to Win 7. Obviously recreating a User Profile in 7 is a little bit more complicated than simply renaming the old profile,…
1
vote
0 answers

How to use a synchronised task to refresh an Activity Once a day in Android?

I'm trying to recreate an activity at a certain time each day, e.g. 6am every morning. Currently, my scheduled task is working, but instead of recreating my Activity once, it continuously recreates it, like it is stuck in a loop. From my Main…
matt
  • 285
  • 4
  • 17
1
vote
2 answers

Android - prevent recreating activity when returning from web browser

In my activity B I have option "Help" which opens URL in web browser. When returning from web browser (with back key) activity is recreated. Why is this happening and how to prevent this? EDIT: This is how i call web browser: Intent browserIntent =…
mgulan
  • 795
  • 1
  • 14
  • 33
1 2 3
8 9