Creating new activity

Now we need an activity where we will create a function to insert the user details and save into the database. Right-click on the app folder and create Empty Activity named NewUserActivity.kt like the following screenshot:

Here is the code of the layout of this class named activity_new_user.xml. (The entire code can be found at GitHub link):

--------    <EditText            android:id="@+id/editEmail"            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:hint="@string/hint_email"            android:inputType="textEmailAddress"            android:padding="5dp"            android:textSize="18sp" android:layout_marginTop="8dp"            app:layout_constraintTop_toBottomOf= ...

Get Learn Spring for Android Application Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.