habitica-android/Habitica/res/layout/fragment_subscription.xml

377 lines
18 KiB
XML
Raw Normal View History

2017-01-10 17:05:03 +00:00
<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/refresh_layout"
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">
<androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbarSize="3dp"
android:scrollbarThumbVertical="@color/scrollbarThumb"
android:scrollbars="vertical"
2020-09-04 16:17:34 +00:00
android:background="@color/content_background">
<LinearLayout
2017-01-12 10:42:36 +00:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/gift_subscription_container"
android:layout_width="match_parent"
2019-11-19 17:07:45 +00:00
android:layout_height="80dp"
android:background="@drawable/g1g1_box"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="10dp"
android:clipChildren="true"
android:clipToPadding="true">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/presents1"
2019-11-19 17:07:45 +00:00
android:scaleType="center"
android:layout_alignParentTop="true"
2019-02-28 13:21:14 +00:00
android:layout_alignParentStart="true"
2019-11-19 17:07:45 +00:00
android:layout_alignParentBottom="false"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/presents2"
2019-11-19 17:07:45 +00:00
android:scaleType="center"
android:layout_alignParentTop="true"
2019-11-19 17:07:45 +00:00
android:layout_alignParentEnd="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/gift_one_get_one_description"
android:layout_marginLeft="60dp"
android:layout_marginRight="60dp"
android:gravity="center_horizontal"
android:textColor="@color/white"
android:textSize="16sp"
android:fontFamily="@string/font_family_medium"
2019-11-19 17:07:45 +00:00
android:layout_marginBottom="12dp"
android:layout_centerInParent="true"/>
</RelativeLayout>
<LinearLayout
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="20dp">
2019-11-19 17:07:45 +00:00
<ImageView
android:id="@+id/header_image_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/subscribe_header"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="20dp"/>
<com.habitrpg.android.habitica.ui.views.subscriptions.SubscriptionDetailsView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/subscriptionDetails"/>
<TextView
2017-01-12 10:42:36 +00:00
android:id="@+id/subscribeBenefitsTitle"
2019-11-26 09:58:14 +00:00
android:layout_width="250dp"
2017-01-12 10:42:36 +00:00
android:layout_height="wrap_content"
android:text="@string/subscribe_prompt"
android:gravity="center"
2019-11-19 17:07:45 +00:00
style="@style/Subheader1"
2020-09-15 07:28:34 +00:00
android:textColor="@color/text_brand"
2017-01-12 10:42:36 +00:00
android:lineSpacingExtra="4dp"
2017-02-03 12:21:42 +00:00
android:layout_marginTop="8dp"
2019-11-26 09:58:14 +00:00
android:layout_gravity="center_horizontal"/>
2017-01-10 17:05:03 +00:00
2019-11-19 17:07:45 +00:00
<ImageView
android:layout_width="wrap_content"
2017-01-12 10:42:36 +00:00
android:layout_height="wrap_content"
2019-11-19 17:07:45 +00:00
android:src="@drawable/separator_fancy"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"/>
2017-02-03 12:21:42 +00:00
2019-11-19 17:07:45 +00:00
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
2019-11-19 17:07:45 +00:00
android:layout_width="68dp"
android:layout_height="68dp"
android:src="@drawable/sub_benefits_gems"
android:scaleType="center"/>
<LinearLayout
2017-02-03 12:21:42 +00:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2019-11-19 17:07:45 +00:00
android:orientation="vertical"
android:layout_marginStart="12dp"
android:layout_gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subscribe_listitem1"
2020-09-04 16:17:34 +00:00
android:textColor="@color/text_primary"
2019-11-19 17:07:45 +00:00
style="@style/Body1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subscribe_listitem1_description"
2020-09-04 16:17:34 +00:00
android:textColor="@color/text_primary"
2019-11-19 17:07:45 +00:00
style="@style/Caption2.Regular"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
2017-01-12 10:42:36 +00:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2019-11-19 17:07:45 +00:00
android:orientation="horizontal">
<ImageView
2019-11-19 17:07:45 +00:00
android:layout_width="68dp"
android:layout_height="68dp"
android:src="@drawable/sub_benefits_hourglasses"
android:scaleType="center"/>
<LinearLayout
2017-02-03 12:21:42 +00:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2019-11-19 17:07:45 +00:00
android:orientation="vertical"
android:layout_marginStart="12dp"
android:layout_gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subscribe_listitem2"
2020-09-04 16:17:34 +00:00
android:textColor="@color/text_primary"
2019-11-19 17:07:45 +00:00
style="@style/Body1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subscribe_listitem2_description"
2020-09-04 16:17:34 +00:00
android:textColor="@color/text_primary"
2019-11-19 17:07:45 +00:00
style="@style/Caption2.Regular"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
2017-01-12 10:42:36 +00:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2019-11-19 17:07:45 +00:00
android:orientation="horizontal">
2019-11-25 12:03:27 +00:00
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/sub_benefits_mystery_item_icon"
2019-11-19 17:07:45 +00:00
android:layout_width="68dp"
android:layout_height="68dp"
android:scaleType="center"/>
<LinearLayout
2017-02-03 12:21:42 +00:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2019-11-19 17:07:45 +00:00
android:orientation="vertical"
android:layout_marginStart="12dp"
android:layout_gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subscribe_listitem3"
2020-09-04 16:17:34 +00:00
android:textColor="@color/text_primary"
2019-11-19 17:07:45 +00:00
style="@style/Body1"/>
<TextView
2019-11-25 12:03:27 +00:00
android:id="@+id/sub_benefits_mystery_item_text"
2019-11-19 17:07:45 +00:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subscribe_listitem3_description"
2020-09-04 16:17:34 +00:00
android:textColor="@color/text_primary"
2019-11-19 17:07:45 +00:00
style="@style/Caption2.Regular"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
2017-01-12 10:42:36 +00:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2019-11-19 17:07:45 +00:00
android:orientation="horizontal">
<ImageView
android:layout_width="68dp"
android:layout_height="68dp"
android:src="@drawable/sub_benefits_pet"
android:scaleType="center"/>
<LinearLayout
2017-01-12 10:42:36 +00:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2019-11-19 17:07:45 +00:00
android:orientation="vertical"
android:layout_marginStart="12dp"
android:layout_gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subscribe_listitem4"
2020-09-04 16:17:34 +00:00
android:textColor="@color/text_primary"
2019-11-19 17:07:45 +00:00
style="@style/Body1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subscribe_listitem4_description"
2020-09-04 16:17:34 +00:00
android:textColor="@color/text_primary"
2019-11-19 17:07:45 +00:00
style="@style/Caption2.Regular"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
2019-11-19 17:07:45 +00:00
android:layout_width="68dp"
android:layout_height="68dp"
android:src="@drawable/sub_benefits_drops"
android:scaleType="center"/>
<LinearLayout
2017-02-03 12:21:42 +00:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2019-11-19 17:07:45 +00:00
android:orientation="vertical"
android:layout_marginStart="12dp"
android:layout_gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subscribe_listitem5"
2020-09-04 16:17:34 +00:00
android:textColor="@color/text_primary"
2019-11-19 17:07:45 +00:00
style="@style/Body1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subscribe_listitem5_description"
2020-09-04 16:17:34 +00:00
android:textColor="@color/text_primary"
2019-11-19 17:07:45 +00:00
style="@style/Caption2.Regular"/>
</LinearLayout>
</LinearLayout>
2017-02-03 12:21:42 +00:00
2019-11-19 17:07:45 +00:00
<ImageView
android:layout_width="wrap_content"
2017-01-10 17:05:03 +00:00
android:layout_height="wrap_content"
2019-11-19 17:07:45 +00:00
android:src="@drawable/separator_fancy"
android:layout_gravity="center"
android:layout_marginTop="20dp"
2019-11-26 09:58:14 +00:00
android:layout_marginBottom="12dp"/>
2017-02-03 12:21:42 +00:00
<ProgressBar
2017-02-03 12:21:42 +00:00
style="?android:attr/progressBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/loadingIndicator"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/no_billing_subscriptions"
android:paddingTop="50dp"
android:paddingBottom="10dp"
android:visibility="gone" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/visit_habitica_website"
android:layout_marginBottom="50dp"
2019-04-25 08:06:56 +00:00
style="@style/HabiticaButton.Purple"
android:visibility="gone" />
<LinearLayout
2017-02-03 12:21:42 +00:00
android:id="@+id/subscriptionOptions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2019-11-26 09:58:14 +00:00
android:orientation="vertical">
2017-02-03 12:21:42 +00:00
2019-11-19 17:07:45 +00:00
<TextView
2019-11-26 09:58:14 +00:00
android:layout_width="250dp"
2019-11-19 17:07:45 +00:00
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
style="@style/Subheader1"
2020-09-15 07:28:34 +00:00
android:textColor="@color/text_brand"
2019-11-19 17:07:45 +00:00
android:text="@string/subscribe_options_title"
android:layout_marginBottom="20dp"/>
<com.habitrpg.android.habitica.ui.views.subscriptions.SubscriptionOptionView
2017-02-03 12:21:42 +00:00
android:id="@+id/subscription1month"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:recurringText="@string/month"
2019-08-24 11:00:20 +00:00
app:gemCapText="@string/subscribe1month_gemcap"/>
2017-02-03 12:21:42 +00:00
<com.habitrpg.android.habitica.ui.views.subscriptions.SubscriptionOptionView
2017-02-03 12:21:42 +00:00
android:id="@+id/subscription3month"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:recurringText="@string/three_months"
2019-08-24 11:00:20 +00:00
app:gemCapText="@string/subscribe3month_gemcap"
2017-02-03 12:21:42 +00:00
app:hourGlassCount="1" />
<com.habitrpg.android.habitica.ui.views.subscriptions.SubscriptionOptionView
2017-02-03 12:21:42 +00:00
android:id="@+id/subscription6month"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:recurringText="@string/six_months"
2019-08-24 11:00:20 +00:00
app:gemCapText="@string/subscribe6month_gemcap"
2017-02-03 12:21:42 +00:00
app:hourGlassCount="2" />
<com.habitrpg.android.habitica.ui.views.subscriptions.SubscriptionOptionView
2017-02-03 12:21:42 +00:00
android:id="@+id/subscription12month"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:recurringText="@string/twelve_months"
2019-08-24 11:00:20 +00:00
app:gemCapText="@string/subscribe12month_gemcap"
2019-11-25 12:03:27 +00:00
app:hourGlassCount="4"
app:flagText="@string/save_20"/>
2017-02-03 12:21:42 +00:00
<Button
2017-02-03 12:21:42 +00:00
android:text="@string/subscribe"
android:layout_width="match_parent"
android:layout_height="36dp"
2017-02-03 12:21:42 +00:00
android:id="@+id/subscribeButton"
2019-04-25 08:06:56 +00:00
style="@style/HabiticaButton.Purple.Small"
android:textAllCaps="false"
2017-02-03 12:21:42 +00:00
android:layout_marginTop="8dp"/>
</LinearLayout>
2019-11-19 17:07:45 +00:00
<ImageView
android:layout_width="wrap_content"
2017-02-03 12:21:42 +00:00
android:layout_height="wrap_content"
2019-11-19 17:07:45 +00:00
android:layout_gravity="center_horizontal"
android:src="@drawable/gift_sub_gift"
android:layout_marginTop="24dp"
2019-11-26 16:37:01 +00:00
android:layout_marginBottom="6dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
2020-09-04 16:17:34 +00:00
android:textColor="@color/text_quad"
android:text="@string/subscribe_gift_description"
android:gravity="center_horizontal"
android:layout_marginLeft="@dimen/spacing_large"
2019-11-19 17:07:45 +00:00
android:layout_marginRight="@dimen/spacing_large"/>
<Button
android:id="@+id/gift_subscription_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/gift_subscription"
android:background="@color/transparent"
2020-09-15 07:28:34 +00:00
android:textColor="@color/text_brand_neon"
android:textAllCaps="false"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
2017-09-05 13:56:34 +00:00
android:layout_height="wrap_content"
2020-09-04 16:17:34 +00:00
android:background="@color/window_background">
<TextView android:id="@+id/supportTextView"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingLeft="16dp"
android:paddingRight="16dp"
2019-10-11 11:18:38 +00:00
android:paddingTop="16dp"
2019-10-15 16:22:54 +00:00
android:paddingBottom="16dp"
2019-08-24 11:00:20 +00:00
android:text="@string/subscribe_title"
android:layout_gravity="center_horizontal"
android:gravity="center"
2020-09-04 16:17:34 +00:00
android:textColor="@color/text_quad"
android:textSize="14sp"
android:lineSpacingExtra="4dp"
2019-10-15 16:22:54 +00:00
android:layout_marginTop="16dp"
android:drawablePadding="@dimen/spacing_medium"/>
</LinearLayout>
2017-01-10 17:05:03 +00:00
</LinearLayout>
</androidx.core.widget.NestedScrollView></androidx.swiperefreshlayout.widget.SwipeRefreshLayout>