activity-stack

Open Browser as Intent but don't keep it on the Activity stack

强颜欢笑 提交于 2019-12-11 12:58:35
问题 I'm having some problems with understanding the activity stack and the behaviour of how it affects my app. Upon clicking a button it starts an Intent which opens the browser. When I'm in the Browser and I press the home button I land onto the homescreen. Now if I start my app again via launcher it opens the browser instead of my app. How can I circumvent opening the browser upon launching my app? Right now, the code to open an url looks like this: private void openUrlExternal(String url) {

Activities and sub activities

不打扰是莪最后的温柔 提交于 2019-12-11 05:56:47
问题 My Application has 5 different activities ( name them as A,B,C,D,E ) and there is a menu (made by buttons on bottom of the screen), to switch between A,B...E when I am displaying A, there are some button by which the user goes on another activity A1 on top of A, then from there he goes into A12, so my activity stack is something like A>A1>A12, now the user click on menu button for B, then he goes on B1 from there . (Stack would be like A>A1>A12>B>B1) now if user press the button to switch

Clear activity stack before launching another activity

自古美人都是妖i 提交于 2019-12-11 04:06:19
问题 Hi there (my first question here ;-) There might be similar questions but none of them seem to answer my question or gives me a real solution... Problem A (root) starts B . B can start other activities. A decides to dismiss the stack (network connection loss) and start C . This seems to be a drastic decision but the user would expect that and that really makes sense in this case... Question How to do that? I would expect using a certain flag or just call something like dismissStack . But I

android parent activity killed on startActivity

落花浮王杯 提交于 2019-12-10 11:14:23
问题 I have a simple application with a listview. When a user taps on a list item, i start a new activity Intent eventdetails = new Intent(HomeActivity.this,EventDetailsActivity.class); eventdetails.putExtra("eventId", ev.getId()); eventdetails.putExtra("eventDate", ev.getEnglishDate()); startActivity(eventdetails); As soon as the EventDetailsActivity is started, the HomeActivity is destroyed (onDestroy is called). WHen the user hits the back button from EventDetailsActivity, the HomeActivity is

what is the right way to clear background activity/activites from stack?

拟墨画扇 提交于 2019-12-09 01:49:10
问题 as the questions title says - I need to know what is the best way to "remove"/destroy/finish an activity that are somewhere in the middle of stack and currently on pause mode (not specific instances - but specific derived classes). for example: if the current state of the stack looks like this: ActivityD <-- top of the stack, currently forground ActivityC ActivityA ActivityC ActivityA a request to "clear" all ActivityC instances would cause the stack to be like: ActivityD <-- still top of the

Android: how to return to Activity with “noHistory” attribute after onStop?

一个人想着一个人 提交于 2019-12-07 10:08:46
问题 I was looking for a way to delete a certain activity from history stack, and found a solution here (Wakkas's anwer). However, if I close the app with this activity opened e.g. by pressing the home button, and later return to it, the activity is not restored. If I remove the "noHistory" attribute, it is coming back and also restored after a kill. Is there a way to make it not appear on the history stack (= don't want to come back to it by pressing the back button in next activity) without this

Android: how to return to Activity with “noHistory” attribute after onStop?

非 Y 不嫁゛ 提交于 2019-12-05 17:59:24
I was looking for a way to delete a certain activity from history stack, and found a solution here (Wakkas's anwer) . However, if I close the app with this activity opened e.g. by pressing the home button, and later return to it, the activity is not restored. If I remove the "noHistory" attribute, it is coming back and also restored after a kill. Is there a way to make it not appear on the history stack (= don't want to come back to it by pressing the back button in next activity) without this behavior? Kind regards, jellyfish I don't think so - leaving the activity via the "Home" button and

How avoid returning to login layout pressing the back button/key?

∥☆過路亽.° 提交于 2019-12-05 17:56:20
问题 I want create an app for my institute. The problem is: my application will have two layouts (login and dashboard). Students can correctly fill out the login form, enter the dashboard, press buttons, and fill other fields. But if the user then presses the back button, it should not return to the login screen, but remain in the dashboard, or failing that, exit the application. Then if a student reopens the application and it's already logged, he should be automatically redirected to the

Finish All Instance of particular Activity

杀马特。学长 韩版系。学妹 提交于 2019-12-05 07:46:26
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) ... Activity C(1) and C(2) are two different instance of Activity C launched while navigating the application .So what is requisite is to clear all the instance of activity C and the result should be when I finish C(2) I should have left with these stack A,B,D . What should I do . IMP -I want to keep the C(1) alive in stack until unless I finish the C(2) as I could

How avoid returning to login layout pressing the back button/key?

落花浮王杯 提交于 2019-12-04 03:23:07
I want create an app for my institute. The problem is: my application will have two layouts (login and dashboard). Students can correctly fill out the login form, enter the dashboard, press buttons, and fill other fields. But if the user then presses the back button, it should not return to the login screen, but remain in the dashboard, or failing that, exit the application. Then if a student reopens the application and it's already logged, he should be automatically redirected to the dashboard, and not the login screen, unless the user press the logout button on the dashboard, then redirect