This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Following Android Classes uses Design Patterns | |
1) View Holder uses Singleton Design Pattern | |
2) Intent uses Factory Design Pattern | |
3) Adapter uses Adapter Design Pattern | |
4) Broadcast Receiver uses Observer Design Pattern |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What is Android Task Affinity used for? | |
An android application has Activities that form a stack like a deck of cards. If you start an android application, and start five activities A,B,C,D,E. They will form a stack | |
E - chat view | |
D - weather screen | |
C - map view | |
B - weather screen | |
A - login screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"standard" (the default mode) | |
Default. The system creates a new instance of the activity in the task from which it was started and routes the intent to it. | |
The activity can be instantiated multiple times, each instance can belong to different tasks, and one task can have multiple | |
instances. | |
"singleTop" | |
If an instance of the activity already exists at the top of the current task, the system routes the intent to that instance | |
through a call to its onNewIntent() method, rather than creating a new instance of the activity. The activity can be | |
instantiated multiple times, each instance can belong to different tasks, and one task can have multiple instances | |
(but only if the activity at the top of the back stack is not an existing instance of the activity). |