diff --git a/auth/src/main/res/layout/dialog_fragment_manage_subscription.xml b/auth/src/main/res/layout/dialog_fragment_manage_subscription.xml index 9c64170396f9e98af3ef56fe57e20939b26c2c64..6d9a01aaad7447647d1ee82d71ea30572572dd22 100644 --- a/auth/src/main/res/layout/dialog_fragment_manage_subscription.xml +++ b/auth/src/main/res/layout/dialog_fragment_manage_subscription.xml @@ -1,6 +1,7 @@ <?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"> @@ -29,14 +30,142 @@ <TextView android:id="@+id/tvEmptyMessage" + style="@style/subheadline" android:layout_width="0dp" android:layout_height="wrap_content" android:gravity="center" + android:paddingHorizontal="16dp" android:text="@string/you_don_t_have_any_active_subscriptions" + android:textSize="22sp" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/toolbarDivider" + tools:visibility="visible" /> + + <ProgressBar + android:id="@+id/vLoading" + android:layout_width="wrap_content" + android:layout_height="wrap_content" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/toolbarDivider" /> + <LinearLayout + android:id="@+id/lSubscriptionInfo" + android:layout_width="0dp" + android:layout_height="0dp" + android:layout_marginTop="36dp" + android:layout_marginBottom="24dp" + android:gravity="center_horizontal" + android:orientation="vertical" + android:paddingHorizontal="16dp" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/toolbarDivider" + tools:visibility="visible"> + + <com.google.android.material.imageview.ShapeableImageView + android:id="@+id/ivCover" + style="@style/AuthLogoStyle" + android:layout_width="@dimen/group_icon_size" + android:layout_height="@dimen/group_icon_size" + + android:scaleType="centerCrop" + app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.GroupIconRadius" /> + + + <TextView + android:id="@+id/tvName" + style="@style/title2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="36dp" + android:gravity="center" + tools:text="Aasdsadasdsaf" /> + + <TextView + android:id="@+id/tvDescription" + style="@style/body" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:gravity="center" + tools:text="Aasdsadasdsaf" /> + + <TextView + android:id="@+id/tvStatus" + style="@style/body" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:gravity="center" + android:text="@string/status_active" /> + + <TextView + android:id="@+id/tvPrice" + style="@style/body" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:gravity="center" + tools:text="Price: " /> + + <TextView + android:id="@+id/tvDuration" + style="@style/body" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:gravity="center" + tools:text="Duration" /> + + <TextView + android:id="@+id/tvPurchasedAt" + style="@style/body" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:gravity="center" + tools:text="Purchased at" /> + + <TextView + android:id="@+id/tvProductId" + style="@style/body" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:gravity="center" + android:textSize="14sp" + tools:text="ProductId: " /> + + <TextView + android:id="@+id/tvAutoRenewMessage" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:gravity="center" + android:textSize="17sp" + tools:text="AutoRenew" /> + + <Space + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/btnManageGp" + style="@style/AccentButtonStyle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="bottom" + android:text="@string/manage_on_google_play" /> + </LinearLayout> + + </androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/auth/src/main/res/layout/list_item_subscription.xml b/auth/src/main/res/layout/list_item_subscription.xml index 24d9a48ab7b058aed2919a7d88dd31b9be64934b..624f83c15f3416c7ba9813710036fb463b7901ac 100644 --- a/auth/src/main/res/layout/list_item_subscription.xml +++ b/auth/src/main/res/layout/list_item_subscription.xml @@ -14,9 +14,8 @@ android:id="@+id/ivIcon" style="@style/AuthLogoStyle" android:layout_width="@dimen/group_icon_size" - android:layout_height="0dp" + android:layout_height="@dimen/group_icon_size" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintDimensionRatio="W,1:1" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> diff --git a/auth/src/main/res/values/strings.xml b/auth/src/main/res/values/strings.xml index 6726c3a87d25c5d9679983fb9773b60ad02be1c9..cd4e34c606e1a9c908c84899bdf50f35a3e91941 100644 --- a/auth/src/main/res/values/strings.xml +++ b/auth/src/main/res/values/strings.xml @@ -159,6 +159,16 @@ Or, think about all of your friends across all of the places you\'ve ever lived. <string name="configure">Configure</string> <string name="receive_email_updates">Receive email updates</string> <string name="you_don_t_have_any_active_subscriptions">You don\'t have any active subscriptions</string> + <string name="manage_on_google_play">Manage on Google Play</string> + <string name="status_active">Status: Active</string> + <string name="price_format">Price: %s</string> + <string name="duration_format">Duration: %s</string> + <string name="purchase_time_format">Purchase time: %s</string> + <string name="product_id_format">Product id: %s</string> + <string name="is_auto_renew_message">Subscription will renew automatically</string> + <string name="is_not_auto_renew_message">Subscription will not renew automatically</string> + <string name="can_not_open_google_play">Can not open Google Play</string> + <plurals name="days"> <item quantity="one">%1$d day</item>