0% found this document useful (0 votes)
5 views2 pages

XML CODE-WPS Office

The document contains XML code for a user interface layout in an Android application. It features a ScrollView containing a LinearLayout with toggle buttons for 'Login' and 'Register', along with corresponding forms for each action. The Login form is visible by default, while the Register form is initially hidden.

Uploaded by

danishawale0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

XML CODE-WPS Office

The document contains XML code for a user interface layout in an Android application. It features a ScrollView containing a LinearLayout with toggle buttons for 'Login' and 'Register', along with corresponding forms for each action. The Login form is visible by default, while the Register form is initially hidden.

Uploaded by

danishawale0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

XML CODE:

<?xml version="1.0" encoding="utf-8"?>


<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="20dp">

<!-- Toggle Buttons -->


<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">

<Button
android:id="@+id/btnLoginTab"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="Login" />

<Button
android:id="@+id/btnRegisterTab"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="Register" />
</LinearLayout>

<!-- Login Form -->


<LinearLayout
android:id="@+id/layoutLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible"
android:paddingTop="20dp">

<EditText
android:id="@+id/etLoginEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Email" />

<EditText
android:id="@+id/etLoginPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Password"
android:inputType="textPassword" />

<Button
android:id="@+id/btnLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Login" />
</LinearLayout>

<!-- Register Form -->


<LinearLayout
android:id="@+id/layoutRegister"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone"
android:paddingTop="20dp">

<EditText
android:id="@+id/etRegisterName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Full Name" />

<EditText
android:id="@+id/etRegisterEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Email" />

<EditText
android:id="@+id/etRegisterPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Password"
android:inputType="textPassword" />

<Button
android:id="@+id/btnRegister"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Register" />
</LinearLayout>

</LinearLayout>
</ScrollView>

You might also like