Question

I know many of you will direct me to the API. I am getting confused the more I read about Intent Fragment and Activity. Can anyone please describe what are these and why are these three important for the process of android application development?

Thanks for you help in advance.

Was it helpful?

Solution

1) Intent : -
It's an "intention" to do an action. It is like sending Message to Android OS to carry Out some task. For ex: Start other activity if some action happens. See Below Links : http://developer.android.com/reference/android/content/Intent.html

2) Activity : -

It is a Single Screen that users Interacts with.It is the only component that can (and must) have a user interface. Learn Activity Life cycle. It is Very important. You Should declare your activity in manifest File.

3) Fragment : -

A Fragment is a behavior or a portion of user interface in an Activity. We can call it like sub Part of Activity.Just Remember that Fragment May or may not have view. It is Like Small Activity,but they can be multiple on single screens and we can interact with them. Read the Fragment Doc from Developers site. It is great place to Start. see this : - http://developer.android.com/guide/components/fragments.html

OTHER TIPS

In Simple Words,

1) Activity: is a screen which hold view(s) for GUI components. A Window in Desktop Application. It has a lifecycle like created,paused, stopped like in window.

2) Fragment: is a component used for dynamic GUI development. it also has a own lifecycle. But only difference is that it can't be used directly. it should be encompassed in Activity in order work. An activity may have one or more than one fragments.

3) Intent: is a message passing framework from one activity to another. message can be anything causing an activity to resume, passing extra to an activity or cause an application to start.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top