I am try to add theme change option in my application.I have a main activity called timeline.And from there user can go to themechange activity can change theme.It changes the theme of the themechange activity but not the timeline i.e mainactivity.When i reload the timeline activity again i can see the chnage.
Then i add the following code to save button in themechange activity to reload timeline
I have an Android application that can perform certain actions. However, I also allow the creation of shortcuts on the homescreen to perform certain things. There is a certain thing you can do in the app by pressing a button in it which calls a method (lets call the method DoAction), that I want to allow users to do directly from a shortcut.
I am developing a simple Android app that has a few Activities, say: A, B, C, and D.
*Activity A* is a splash screen.
I'm trying to pass something from one class to my MainActivity, but it doesn't seem to work, I don't understand why.
I have my GPS Tracker on another class (not the MainActivity) in order to reuse it.
When the location changes, I want my other class to call a method from within the MainActivity to update my UI.
I summarized my code like that :
My MAIN ACTIVITY :
public class MainActivity exten
My Problem is while clicking the button it goes to next Activity during that time it takes nearly 10-12 secs for loading the values in next activity.Please help me from this issue and suggestions will be appreciable.
I'd like to destroy an Activity when the user clicks on a button (not the back button, a different button). I've decided to just call super.onBackPressed. Is that okay? What's a better way to close the current Activity without closing the whole app?
There can be many activities in application and the last launched activity stay on top of stack and on pressing back it finish the current activity.I have a sequence of Activity and here is the flow ..
if we have A,B,C(1),D,C(2)...
so I would like be able start and stop another activity from parent, for example if I want show custom dialog as an activity.
So, to start activity I use:
private void showIntentDialog() {
Intent i = new Intent(ActivityA.this, ActivityB.class);
ActivityA.this.startActivity(i);
}
But how, how can I handle it with stopping activity?
private void stopIntentDialog(){
//how to fini
I have a Fragment F. After getting result from a service, F needs to finish the activity it is in and launch a page in the web browser which I do using an intent.
It does seem to work fine if the user presses the back button. However, if he launches the app from recent apps, the activity isn't finished.
I have thought about otherways of doing it.