Learn Android App Dev: Activity Lifecycle
Hey there! This is Amey Lokhande once again. In this post I'll be talking about the lifecycle of Android Activity. When I talk about lifecycle of an Activity class, then it means which class it inherits.
For ex, if this is the given code which is provided by Android Studio:
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
Now here the Main Activity class inherits AppCompatActivity class. And if you want to see how is the AppCompatActivity class defined then all you need is to simply hover your mouse pointer by holding ctrl button.
If you click on AppCompatActivity by holding ctrl, then you can see how the AppCompatActivity Class is defined. Similarly you can also see how the other classes are defined.
Okay this is it for this post. In the next post I will be talking about how to create a simple calculator which does simple jobs of adding, subtracting, dividing and multiplying two numbers. Stay tuned!
Thanks!!