1

I'm making a project that involve an Android App. I need to design the app code with an UML class diagram but I'm bit confused about correct formalism. Many classes uses or extends Android Framework classes (such as Activity, TextView, Button and so on). I've thought that widgets provided by the Framework could be simple class attributes, i.e. if in the MainActivity I have a TextView I put an attribute type TextView inside the class MainActivity (so without any association to Framework class). Now the problem is about extensions, almost all of my classes extends Android Framework (Activity, Fragment, Adapters etc..), how can I represent this?

This is a small example of what I've done: Android UML example design

Here MainActivity and DrawerAdapter should extends something (indeed there are some override). Is it correct to add a new stereotype to the class indicating the Framework extension? Are there better solutions?

Philip
  • 771
  • 1
  • 9
  • 24
  • Can you elaborate on the term "extend" you use, please? – qwerty_so Feb 10 '18 at 19:32
  • 1
    Yes, with extend I mean Java class extension, so here `public class MainActivity extends android.app.Activity { ... }`, I know that I should represent this in UML with a specialization of Android class Activity, but the diagram would become difficult to read because Android Framework classes are many and always the same, for example we all know what an Activity is or what a Fragment is, I ask if there is a smart way to represent this behavior – Philip Feb 10 '18 at 19:45

0 Answers0