resbuilder_app/app/src/main/res/layout/fragment_result.xml
Andrew Ridgway c589e5f9e4
design: Material Design 3 redesign across all layouts and themes
- colors.xml: replaced legacy palette with M3 semantic tokens
  (primary, secondary, tertiary, surface containers, outline, status)
- themes.xml + values-night/themes.xml: switched to
  Theme.Material3.DayNight.NoActionBar, mapped all M3 color roles,
  transparent system bars for edge-to-edge, M3 typography
- attrs.xml: custom semantic attrs (colorSuccess, colorWarning, colorInfo)
- strings.xml: added accessibility labels, loading/empty/error strings
- activity_login.xml: centered branding, M3 headline/body, skeleton card
- activity_main.xml: edge-to-edge CoordinatorLayout, M3 AppBar/toolbar,
  health indicator group, M3 banner, M3 TabLayout
- fragment_job_form.xml: grouped fields in outlined cards (12dp radius),
  FilledBox text inputs, TonalButtons, 16dp margins
- fragment_job_status.xml: chip-style badge, LinearProgressIndicator,
  centered card with error/try-again states
- fragment_result.xml: SuggestionChip badge, WebView fills space,
  bottom action bar in outlined card
- activity_admin.xml + item_admin_user.xml: M3 card list items,
  proper type scale hierarchy
- Updated drawables to use theme attributes

Refs DESIGN.md Material Design 3 + Amazon/Google guidelines.
2026-07-18 23:48:33 +10:00

117 lines
4.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/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"
android:orientation="vertical"
tools:context=".ui.ResultFragment">
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
app:cardCornerRadius="12dp"
app:cardElevation="0dp"
app:strokeColor="?attr/colorOutlineVariant"
app:strokeWidth="1dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:minHeight="48dp"
android:orientation="horizontal"
android:padding="12dp">
<TextView
android:id="@+id/resultBadge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_status_badge"
android:contentDescription="@string/status_completed"
android:gravity="center"
android:minHeight="32dp"
android:paddingHorizontal="12dp"
android:paddingVertical="4dp"
android:text="@string/status_completed"
android:textAppearance="?attr/textAppearanceLabelLarge"
android:textColor="?attr/colorOnPrimary" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
<com.google.android.material.button.MaterialButton
android:id="@+id/copyButton"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:contentDescription="@string/cd_copy_result"
android:minWidth="64dp"
android:text="@string/copy_text" />
<com.google.android.material.button.MaterialButton
android:id="@+id/newButton"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_marginStart="4dp"
android:contentDescription="@string/cd_new_job"
android:minWidth="64dp"
android:text="@string/new_job" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<WebView
android:id="@+id/resultWebView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="16dp"
android:layout_weight="1"
android:contentDescription="@string/result_preview" />
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="16dp"
app:cardCornerRadius="12dp"
app:cardElevation="0dp"
app:strokeColor="?attr/colorOutlineVariant"
app:strokeWidth="1dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="12dp">
<com.google.android.material.button.MaterialButton
android:id="@+id/pdfButton"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:contentDescription="@string/cd_export_pdf"
android:text="@string/export_pdf" />
<com.google.android.material.button.MaterialButton
android:id="@+id/docxButton"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_marginStart="8dp"
android:layout_weight="1"
android:contentDescription="@string/cd_export_docx"
android:text="@string/export_docx" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>