I have 6 Buttons, for 1st 3 Buttons i want to start same activity and for other 3 Buttons separate new activities.
So problem arises when i click on 1st button and then the second Button which starts same activity because we can not start same activity from same activity.
So I just need to know weather the activity which i am going to start is the same activity which is running, based on that if
My app has 2 activities:
- Activity (1) has a button to start Activity (2), this button isn't set transparent
- Activity (2) has a button that is transparent by setAlpha()
My problem is sometimes, when I back to Activity (1) from Activity (2) by pressing back button, a button of Activity (1) becomes transparent same as button of Activity (2).
I don't know why this problem can occur, please help
I have three activities: A, B and C, where A is a starting activity. When user clicks a button in activity A, activity B is started with Intent.FLAG_ACTIVITY_REORDER_TO_FRONT. In activity B user can click another button and it starts activity C also with Intent.FLAG_ACTIVITY_REORDER_TO_FRONT. Loaded activity C plays some sound.
Please refer to this image:
https://lh4.googleusercontent.com/-gEW9RFcjpnQ/UTKSd0DSR5I/AAAAAAAAALs/P...
1- When the application is started, a splash-screen is displayed through an activity
2- Then, execution goes to the Main Activity (and splash-screen activity is finished)
3- User, through button click, can go to screen-1 or screen-2 activities.
3.1- When doing so
in my application having two activities like , activity A as main and launcher, and activity B, scenario : activity A started after launching app. started activity B from A, started another activity X of other application from B. now hitting BACK button of hardware, taking me to the Activity A. it actually should go back to the activity B , as it is the last activity.
I am going crazy trying to figure out how to store a variable someplace so when I switch to another activity then back again the variable still contains this value. I did this a while ago using shared preferences, but this was a bad solution, this was way more permanent than I needed and just not the correct way.
So I have 2 activities lets say A and B. A navigates to B, I want the activity A to be killed or make it unusable/unseen when directed from B.
so it should be like when I press the back button on B activity it should not open activity A instead it should go to the app tray.
also activity A should comeback when I clear the application data
thanks.
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)...
How can I create an activity with the same layout/design as dialogs?