Android SDK Evolution and Confusion

While studying the Android SDK, I learnt that Android provides two separate methods to switch screens. You can either switch using Activities or by using Fragments. The problem is, it is not very clear which method you should use.

For example, you get this question on Stack Overflow, “Dilemma: when to use Fragments vs Activities”, and it gets closed because it is considered to be entirely based on opinion.

Another Stack Overflow question “android – need some clarifications of fragments vs activities and views” was not closed, but still illustrates the complexity of this issue.

It’s truly annoying that programmers new to Android have to go through this early on.

Fragments were introduced when Android started to support tablets with Android 3.0. In my opinion, the co-existence of Activities and Fragments with overlapping functionality is a result of the rather ad-hoc way the platform has evolved.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: