Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have a activity, named MainActivity. I want to recall the onCreate activity in this activity(MainActivity).
MainActivity.this.onCreate(....);
How can I do this?
You can but you should not. You should mention your requirement. But if you want to execute the same code that is in onCreate then you can take out that code to separate method and call that in onCreate and from the place where you wanted to call onCreate from.
Find more info on this here.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
Can I make TextView object monitor certain value that is being changed as app is running?
I don't want to keep passing context objects around just so I would be able to call findViewById and then calling the setText() method for TextView object. I want it to react when certain value changes.
I am looking into autofill() method but I am not sure if I am going to find an answer there...
you should try dataBinding,
example -> https://guides.codepath.com/android/Applying-Data-Binding-for-Views
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
In my Application, I want to show a 'Map' like below in the picture, so is there any special method to add this Because we can't add one Activity into another Activity so I am searching for a special method or technique, no doubt many application are using this but I am not familiar with that method, I searched but could not find any appropriate answer.
An Activity can never host an Activity. You can only add a MapFragment.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Is it possible to change the parameters of onCreate() in a fragment (If We can Then will it be called in the beginning similar to a normal onCreate() Method.
NO You can't change its parameters.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
If I want to start a new activity after a user selects an item from a list , do I have to use Intents?
Yes. The only way to start an activity is to use startActivity() (or startActivityForResult()), and each takes an Intent.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
When my app starts, the launcher activity's onCreate() method gets called normally only once. But that is immediately followed by two calls to onResume(). When I inspect the code, both instances are of the same class but only one has instanced members from the onCreate(), obviously.
Everything is working fine, though. I am just curious trying to understand why this is happening. Does anybody have any ideas? I'm using SherlockFragmentActivity, does that have anything to do with it? I'm happy to provide more information as needed. I just don't know now what else is relevant.
Thanks!