My Android app seemed to have been working fine till i did a git reset on it.
Good day, i have 2 Activities which have their own set of fragments. now anytime i switch between this Activities through intents, it always re-intializes the fragments. I have extended the application class and used it in the activity so that certain operations don't run from OnCreate() again. but no luck. any ideas or is it just the way the life cycle works.
How can I keep only last X number of activities when starting new activity instances:
For example, keeping last 3 activities:
Given:
Activity1 -> Activity2 (first instance) -> Activity2 (second instance)
Launching Activity 3 will result with a history task having:
Activity2 (first instance) -> Activity2 -> (second instance) -> Activity3 (..Activity1 destroyed and removed)
I know
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
I have 5 activities. When I click on any button in any of those 5 activities, I want to close the application and when I reopen it, I want to launch the application from first activity.
I have a custom component that is a number of TextView, which displays the status of the application, that is, I'm choosing items from a list.
I have two activitys:
Main Activity:
-4 Buttons that send you to the second activity by passing a parameter selected button to show you a list of some other objects.
-Custom Component (android:id="@+id/controlInfo1")
Activity List:
-Custom Component(andr
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.
in windows forms, when you put a component (for example, a textbox) on the form and change it's (Name) to (for example) textBox1, then in your code you can simply access to it by writing: textBox1.Text.
but in android, you put a editText in your activity, and give it an id. but whenever you want to use it in your code, you must at least call one time the findViewById function.
I have an app with 4 main tab fragments. However, inside each tab, the user can do different actions which brings him to navigate inside that same tab. Should I launch new activities or just replace the tab fragment with new fragments? The big downside I see of using new activities is I lose the tab navigation view.
What should I do? Use only fragments?