Weekly_exercise-2-JamesYuRenxiang created by GitHub Classroom
Mobile Application Development
Exercise 2
- Create a new project with the following configuration,
-
Empty Activity
-
Language: Kotlin
-
Minimum API level: API 30: Android 11 (R)
- Create a User class based on the class diagram below.
- Create the layout of your main activity according to the figure shown below.
-
In your onCreate method, the name and description are loaded from the User object. The button on the left will show “Follow” if the variable followed is false, and vice versa.
-
When the left button is clicked, it will toggle the text between Follow and Unfollow. The variable followed is also updated to reflect this.