forked from LibreMV/GridFlow
231 lines
9.2 KiB
XML
231 lines
9.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout 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="?android:attr/colorBackground"
|
|
tools:context=".ui.subscriptions.SubscriptionsFragment">
|
|
|
|
<!-- Loading indicator -->
|
|
<ProgressBar
|
|
android:id="@+id/progress_loading"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:visibility="gone" />
|
|
|
|
<!-- Error message -->
|
|
<LinearLayout
|
|
android:id="@+id/layout_error"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
android:gravity="center"
|
|
android:padding="32dp"
|
|
android:visibility="gone">
|
|
|
|
<TextView
|
|
android:id="@+id/text_error"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textSize="16sp"
|
|
android:textColor="?android:attr/textColorPrimary"
|
|
android:gravity="center"
|
|
android:layout_marginBottom="16dp"
|
|
tools:text="Failed to load subscriptions" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btn_retry"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Retry" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Empty state -->
|
|
<LinearLayout
|
|
android:id="@+id/layout_empty"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
android:gravity="center"
|
|
android:padding="32dp"
|
|
android:visibility="gone">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="No subscriptions found"
|
|
android:textSize="18sp"
|
|
android:textColor="?android:attr/textColorPrimary"
|
|
android:gravity="center"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Add a new subscription to get started"
|
|
android:textSize="14sp"
|
|
android:textColor="?android:attr/textColorSecondary"
|
|
android:gravity="center" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Subscriptions list -->
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/recycler_subscriptions"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:clipToPadding="false"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="80dp"
|
|
tools:listitem="@layout/item_subscription_detailed" />
|
|
|
|
<!-- Add subscription form -->
|
|
<ScrollView
|
|
android:id="@+id/scroll_add_form"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:fillViewport="true"
|
|
android:visibility="gone"
|
|
android:background="?android:attr/colorBackground">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="32dp"
|
|
android:gravity="center">
|
|
|
|
<!-- Header Section -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:gravity="center"
|
|
android:layout_marginBottom="32dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Add New Subscription"
|
|
android:textSize="24sp"
|
|
android:textStyle="bold"
|
|
android:textColor="?android:attr/textColorPrimary"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Enter your subscription details below"
|
|
android:textSize="14sp"
|
|
android:textColor="?android:attr/textColorSecondary"
|
|
android:alpha="0.7" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Form Fields -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<!-- Subscription Number Input -->
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp"
|
|
android:hint="Subscription Number"
|
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/edit_subscription_number"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="text"
|
|
android:textSize="16sp" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<!-- Bill Number Input -->
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp"
|
|
android:hint="Bill Number"
|
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/edit_bill_number"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="text"
|
|
android:textSize="16sp" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<!-- Alias/Description Input -->
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="24dp"
|
|
android:hint="Alias/Description"
|
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/edit_alias"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="text"
|
|
android:textSize="16sp" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<!-- Buttons -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="end">
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btn_cancel_add"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="56dp"
|
|
android:text="Cancel"
|
|
android:textSize="16sp"
|
|
android:textAllCaps="false"
|
|
android:layout_marginEnd="8dp"
|
|
style="@style/Widget.MaterialComponents.Button.TextButton" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btn_continue"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="56dp"
|
|
android:text="Continue"
|
|
android:textSize="16sp"
|
|
android:textAllCaps="false"
|
|
android:paddingHorizontal="24dp" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</ScrollView>
|
|
|
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
|
android:id="@+id/fab_add_subscription"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="bottom|end"
|
|
android:layout_marginEnd="16dp"
|
|
android:layout_marginBottom="16dp"
|
|
android:src="@drawable/ic_add_24"
|
|
android:contentDescription="Add subscription"
|
|
android:tint="?android:attr/colorBackground" />
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|