Reputation: 109
I'm not sure about what I have to put in the UML diagram representation of my activities.
I have a login activity. So I have an xml
file with its labels, buttons etc.
In the LoginActivity.java
file I have some variables like Button
, CheckBox
etc used to add listeners.
Now I'd like to know if I have to add them in my UML
class. Do I have to add loginBn:Button
or myCheckBox:CheckBox
in my LoginActivity
representation in UML
?
Upvotes: 1
Views: 892
Reputation:
In order to answer your second question.
onStart() or onStop() with some other functions are functions getting called during thr lifetime of your activity. You dont have to write them your self. But you can initialize your activity in them or do something else.
In order to do this you have to override the funtion you wanna add your code to and first call the same method of the super class and then add your additional implementation.
For example to add your initialization to onStart you do this:
@Override
public void onStart(){
super.onStart();
System.out.println(„my impl.“);
}
Normally you would initialize your buttons in there or do the setup for the activity.
For more information on the lifecycle read this
Upvotes: 1