Skip to content

Instantly share code, notes, and snippets.

@ramonrabello
Last active November 22, 2023 02:20
Show Gist options
  • Save ramonrabello/acb09895f8211aa354c2786daac1e3c3 to your computer and use it in GitHub Desktop.
Save ramonrabello/acb09895f8211aa354c2786daac1e3c3 to your computer and use it in GitHub Desktop.
Boosting migration to Compose using StackSpot AI - Layout of a simple Login Screen using XML Views
<?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:gravity="center"
android:layout_marginHorizontal="16dp"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_launcher" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Email" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Password" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:checked="true"
android:text="Remember Me" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autoLink="web"
android:gravity="center"
android:layout_marginBottom="10dp"
android:text="Forgot Password?" />
</LinearLayout>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text="Log In" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text="Sign Up" />
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment