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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.