Here is an example of a login UI design using XML code in Android:

 Here is an example of a login UI design using XML code in Android:

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:gravity="center"> <ImageView android:id="@+id/logo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/logo" android:layout_marginTop="30dp" android:layout_gravity="center" /> <EditText android:id="@+id/username" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Username" android:inputType="text" android:layout_margin="15dp" android:padding="10dp" /> <EditText android:id="@+id/password" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Password" android:inputType="textPassword" android:layout_margin="15dp" android:padding="10dp" /> <Button android:id="@+id/login_button" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="LOGIN" android:layout_margin="15dp" android:padding="10dp" /> </LinearLayout>

This code creates a login UI with an ImageView for a logo, two EditText fields for the username and password, and a button for logging in. It uses a LinearLayout with vertical orientation to organize the elements on the screen. It's important to notice that this is a basic example, you should use other elements or libraries to make a secure login, like a password input type and a encryption system to protect the user's data.

Comments