Once upon a time, Android developers used only two things called activities and views in order to create their user interfaces. If you're like me and you come from a desktop programming environment, an Activity is sort of like a form or a window. Except it's more like a controller for one of these classes. With that analogy in place, a view is then similar to a control. It's the visual part you're interacting with as a user. I remember the learning curve being pretty steep for me being so stuck in my desktop (C# and WPF) development, but once I came up with these analogies on my own, it seemed pretty obvious. So to make an Android application, one would simply put some views together and chain some activities to show these views. Pretty simple. Something changed along the way though. It was apparent that the Activity/View paradigm was a bit lacking so something new was added to the mix: The Fragment. Fragments were introduced in Android 3.0 (which is API level 11). Fragments added the flexibility to be able to swap out parts of an activity without having to completely redefine the whole view. This means that having an application on a mobile phone with a small screen can appear differently than when it's on a large tablet, and as a developer you don't have to redesign the whole bloody thing. Awesome stuff!


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

Android, Android Development, Android Resources, Android Samples,Mobile Development Tutorials,Mobile Developments