Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
160 lines
6.9 KiB
XML
160 lines
6.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="?attr/colorSurface"
|
|
tools:context=".ui.LoginActivity">
|
|
|
|
<!-- Decorative gradient background behind card -->
|
|
<View
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:background="@drawable/bg_gradient_primary"
|
|
app:layout_constraintBottom_toTopOf="@id/guidelineTop"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<ImageView
|
|
android:layout_width="120dp"
|
|
android:layout_height="120dp"
|
|
android:layout_marginEnd="@dimen/space_lg"
|
|
android:layout_marginBottom="@dimen/space_lg"
|
|
android:alpha="0.15"
|
|
android:contentDescription="@null"
|
|
android:src="@drawable/ic_sparkle"
|
|
app:layout_constraintBottom_toTopOf="@id/guidelineTop"
|
|
app:layout_constraintEnd_toEndOf="parent" />
|
|
|
|
<androidx.constraintlayout.widget.Guideline
|
|
android:id="@+id/guidelineTop"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
app:layout_constraintGuide_percent="0.40" />
|
|
|
|
<!-- Main content card -->
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/loginCard"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="@dimen/space_lg"
|
|
app:cardBackgroundColor="?attr/colorSurfaceContainerLow"
|
|
app:cardCornerRadius="@dimen/card_radius_large"
|
|
app:cardElevation="0dp"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintVertical_chainStyle="packed"
|
|
app:strokeColor="?attr/colorOutlineVariant"
|
|
app:strokeWidth="1dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_horizontal"
|
|
android:orientation="vertical"
|
|
android:padding="@dimen/space_xl">
|
|
|
|
<!-- App icon with tonal surface -->
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:layout_width="@dimen/space_xxl"
|
|
android:layout_height="@dimen/space_xxl"
|
|
app:cardBackgroundColor="?attr/colorPrimaryContainer"
|
|
app:cardCornerRadius="@dimen/card_radius_large"
|
|
app:cardElevation="0dp"
|
|
app:strokeWidth="0dp">
|
|
|
|
<ImageView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:contentDescription="@string/cd_app_logo"
|
|
android:padding="@dimen/space_md"
|
|
android:scaleType="centerInside"
|
|
android:src="@drawable/ic_launcher_foreground"
|
|
app:tint="?attr/colorOnPrimaryContainer" />
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<!-- Title -->
|
|
<TextView
|
|
android:id="@+id/loginTitle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/space_lg"
|
|
android:text="@string/app_title"
|
|
android:textAlignment="center"
|
|
android:textAppearance="?attr/textAppearanceHeadlineMedium"
|
|
android:textColor="?attr/colorOnSurface"
|
|
android:textStyle="bold" />
|
|
|
|
<!-- Subtitle -->
|
|
<TextView
|
|
android:id="@+id/loginSubtitle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/space_sm"
|
|
android:text="@string/welcome_subtitle"
|
|
android:textAlignment="center"
|
|
android:textAppearance="?attr/textAppearanceBodyLarge"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
<!-- Divider -->
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:layout_marginVertical="@dimen/space_lg"
|
|
android:background="?attr/colorOutlineVariant" />
|
|
|
|
<!-- Sign in button -->
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/googleSignInButton"
|
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="56dp"
|
|
android:fontFamily="sans-serif-medium"
|
|
android:minHeight="@dimen/button_height"
|
|
android:text="@string/sign_in_with_google"
|
|
android:textAllCaps="false"
|
|
android:textColor="?attr/colorOnSurface"
|
|
android:textSize="16sp"
|
|
app:cornerRadius="14dp"
|
|
app:icon="@drawable/ic_google"
|
|
app:iconGravity="textStart"
|
|
app:iconPadding="@dimen/space_md"
|
|
app:iconSize="24dp"
|
|
app:iconTint="@null"
|
|
app:strokeColor="?attr/colorOutline"
|
|
app:strokeWidth="1.5dp" />
|
|
|
|
<!-- Helper text -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/space_md"
|
|
android:text="@string/sign_in_terms"
|
|
android:textAlignment="center"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
</LinearLayout>
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<!-- Progress indicator -->
|
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
|
android:id="@+id/loginProgress"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:indeterminate="true"
|
|
android:visibility="gone"
|
|
app:indicatorColor="?attr/colorOnPrimary"
|
|
app:indicatorSize="@dimen/space_xxl"
|
|
app:layout_constraintBottom_toTopOf="@id/loginCard"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="@id/guidelineTop"
|
|
app:trackColor="?attr/colorPrimaryContainer" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|