Is this OK to understand that Activity is similar to ViewController in iOS?
I am confused to accept a concept of terms in Android as Activity, Service etc...
We can say Activity is equivalent to ViewController, since it has its own lifecycle( onCreate in Android and viewDidLoad in iOS) but not fully.
Views are for display, model objects are for data, controllers are the glue in between them.
A view controller manages a single root view, which may itself contain any number of subviews. User interactions with that view hierarchy are handled by your view controller, which coordinates with other objects of your app as needed. Every app has at least one view controller whose content fills the main window.
There are two types of view controllers: Content view controllers manage a discrete piece of your app's content and are the main type of view controller that you create.
Yes, I would say that Activity and ViewController are rather similar. There is just one BIG difference. In iOS you have a delegate to control your application's state, like a new ViewController has started or the application is finished. In Android you do this separately for each activity via onCreate(), onPause(), etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With