activity-finish Questions

25

Solved

I have a splash screen on a timer. My problem is that before I finish() my activity I need to check that the next activity has started because a system dialogue box pops-up and I only want to finis...
Hargrave asked 3/8, 2013 at 23:45

14

Solved

I have try to close the current fragment by using Imagebutton. I am in Fragment-A and it will turn to the Fragment-B when I click the button. And when I click the button at Fragment-B , it will t...
Ulrick asked 28/12, 2013 at 9:24

8

Solved

In my app I have a logout functionality. If user clicks logout it goes to home screen. Now I am exiting my app by pressing back button. But what I want is I need to exit automatically(i.e Programma...
Amphigory asked 23/5, 2012 at 11:14

9

Solved

I have an Android application. I am making a loading screen with a progress bar. I entered a delay in the onCreate method. When the timer finishes, I want to finish the current activity and start ...
Marvelofperu asked 15/2, 2011 at 7:11

3

Like: startActivity(intent); finish(); Without calling finish() explicitly, onDestroy() is not called for the former Activity, and I run out of memory (OutOfMemory Exception). So, is it a good ...
Alysa asked 7/8, 2013 at 18:40

6

I know this question is common and asked many times on Stack Overflow, but after visiting nearly the four pages of search engine results and nearly the 20 question of Stack Overflow regarding this ...
Newman asked 4/3, 2014 at 8:11

21

Solved

I have an application with multiple pages i.e., multiple activities and some of them remain open. Is there a way to close all activities at once?
Tagmemics asked 22/12, 2012 at 10:18

2

Solved

I have a question concerning the finish() method of an activity in android studio: I have this simple code: public class MainActivity extends AppCompatActivity { @Override protected void onC...
Polyphone asked 16/9, 2017 at 14:16

2

Solved

I'm working on an app that plays mp3 files automatically and in succession from within a given activity. it knows when the current mp3 play is completed by listening for an "onCompletion" event fro...
Shoreline asked 11/6, 2011 at 2:54

6

Solved

I'm working on making an application more Material and I'm just stuck on how to implement some shared element transitions. I have an activity A that starts another B and then calls finish() in orde...

2

Solved

In my app, i created a custom notification that contain a button that show recent apps(instead of home button long press) when user open main activity and press home button to go to home screen th...
Gavingavini asked 27/2, 2014 at 2:58

11

I've been trying to show a "Do you want to exit?" type of dialog when the user attempts to exit an Activity. However I can't find the appropriate API hooks. Activity.onUserLeaveHint() initially l...

12

Solved

I've got 4 activities say Act1, Act2, Act3 and Act4. A button in Act1 opens Act2, a button in Act2 opens Act3, a button in Act3 opens Act4. I want two things to be done: I've a button in Act4 wh...
Nicely asked 18/6, 2012 at 10:44

2

Solved

I need to delete app from recently used apps list. There is no problem on API level 21 and above. I use finishAndRemoveTask() method. But that method cannot be used on API levels lover than 21. How...
Bianco asked 25/11, 2016 at 9:51

2

Solved

(Yes, I've already looked at existing questions related to this problem.) I am calling finish() from my Activity's Up button listener. But although onDestroy() does get around to being called, fir...

2

Solved

I have Two Activity one is InventoryActivity and Second is StoneDetailActivity. In my InventoryActivity have RecycleView In RecycleView Button Click I start the StoneDetailActivity using StartActiv...

4

Solved

I'm talking about programming in android. In early days I thought that, finish() closes current activity and go back to the previous in Activity stack, and System.exit(0) closes the whole applicat...
Vault asked 17/8, 2013 at 18:26

3

Solved

Ok i have tons of $http() calls all around the app code, i'm wondering is there any way / best practice to detect when all $http() around the app have finished ( success/error donesn't matter what...
Baccy asked 29/4, 2014 at 10:19

3

Solved

I'm working on an app that has two activities, Main and Info. The App is started with the MainActivity and when you click a button the InfoActivity slides in from the right side. When you click ano...
Detective asked 25/2, 2013 at 21:15

5

Solved

For a complicated reason I need to be able to finish() my activities when the user presses the HOME button. The story here is that I have a homescreen widget that launches a different part of my a...
Hungnam asked 17/6, 2011 at 15:50

1

Solved

I got this exception "java.lang.IllegalStateException: Can not be called to deliver a result" And didn't immediately understand why. Below is my answer to why this happened, maybe...
Puling asked 16/10, 2014 at 21:33

3

I read all about the activity lifecycle and it's methods. I still couldt find an answer: When I close my app, from the "open apps" menu (in galaxy4 it's a long press on the home button, in nexus5 ...
Koball asked 15/7, 2014 at 13:45

2

In my application I have a navigation drawer, and the way my app works is there is only one activity and if you select something from the Navigation drawer it starts/replaces the current fragment. ...
Stalinsk asked 20/6, 2013 at 20:39

2

Solved

In my MainActivity I call MyDialog dialog = new MyDialog(MainActivity.this); dialog.show(); MyDialog is my own class where I customize the dialog. In the dialog is a button. I want that the Main...
Brelje asked 18/3, 2014 at 11:8

2

Solved

Simple question: can you be sure that finish() will call onDestroy()? I haven't found any confirmation on this.
Designing asked 10/11, 2013 at 16:15

© 2022 - 2024 — McMap. All rights reserved.