render subscriptions

This commit is contained in:
2025-07-25 03:12:12 +05:00
parent 245ba50172
commit eecd4b0f1d
10 changed files with 515 additions and 37 deletions

View File

@@ -1,37 +1,86 @@
<?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: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">
<ScrollView
<!-- 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:fillViewport="true">
android:orientation="vertical"
android:gravity="center"
android:padding="32dp"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
<TextView
android:id="@+id/text_error"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="20dp"
android:gravity="center">
android:textSize="16sp"
android:textColor="?android:attr/textColorPrimary"
android:gravity="center"
android:layout_marginBottom="16dp"
tools:text="Failed to load subscriptions" />
<TextView
android:id="@+id/text_subscriptions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:textColor="?android:attr/textColorPrimary"
android:gravity="center"
android:layout_marginTop="100dp"
tools:text="Subscriptions\n\nComing soon..." />
<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>
</LinearLayout>
</ScrollView>
<!-- 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="8dp"
android:paddingBottom="80dp"
tools:listitem="@layout/item_subscription_detailed" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_add_subscription"
@@ -42,6 +91,6 @@
android:layout_marginBottom="16dp"
android:src="@drawable/ic_add_24"
android:contentDescription="Add subscription"
app:tint="?android:attr/colorBackground" />
android:tint="?android:attr/colorBackground" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>