[android] Bookmark Subscription Screen
|
@ -472,6 +472,8 @@
|
|||
<activity
|
||||
android:name="com.mapswithme.maps.settings.DrivingOptionsActivity"
|
||||
android:label="@string/driving_options_title"/>
|
||||
<activity android:name="com.mapswithme.maps.bookmarks.BookmarkSubscriptionActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize" />
|
||||
<service
|
||||
android:name="com.mapswithme.maps.background.WorkerService"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE"
|
||||
|
|
23
android/res/animator/lift_on_touch.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:state_enabled="true"
|
||||
android:state_pressed="true">
|
||||
<set>
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="translationZ"
|
||||
android:valueTo="12dp"
|
||||
android:valueType="floatType"/>
|
||||
</set>
|
||||
</item>
|
||||
<item>
|
||||
<set>
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="translationZ"
|
||||
android:valueTo="0"
|
||||
android:valueType="floatType"/>
|
||||
</set>
|
||||
</item>
|
||||
</selector>
|
BIN
android/res/drawable-hdpi/ic_close_blue.png
Executable file
After Width: | Height: | Size: 464 B |
BIN
android/res/drawable-hdpi/img_annual_subscription_offer.png
Executable file
After Width: | Height: | Size: 20 KiB |
BIN
android/res/drawable-hdpi/img_monthly_subscription_offer.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
android/res/drawable-mdpi/ic_close_blue.png
Executable file
After Width: | Height: | Size: 322 B |
BIN
android/res/drawable-mdpi/img_annual_subscription_offer.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
android/res/drawable-mdpi/img_monthly_subscription_offer.png
Executable file
After Width: | Height: | Size: 8.7 KiB |
BIN
android/res/drawable-xhdpi/ic_close_blue.png
Executable file
After Width: | Height: | Size: 539 B |
BIN
android/res/drawable-xhdpi/img_annual_subscription_offer.png
Executable file
After Width: | Height: | Size: 26 KiB |
BIN
android/res/drawable-xhdpi/img_monthly_subscription_offer.png
Executable file
After Width: | Height: | Size: 20 KiB |
BIN
android/res/drawable-xxhdpi/ic_close_blue.png
Executable file
After Width: | Height: | Size: 819 B |
BIN
android/res/drawable-xxhdpi/img_annual_subscription_offer.png
Executable file
After Width: | Height: | Size: 37 KiB |
BIN
android/res/drawable-xxhdpi/img_monthly_subscription_offer.png
Executable file
After Width: | Height: | Size: 31 KiB |
BIN
android/res/drawable-xxxhdpi/ic_close_blue.png
Executable file
After Width: | Height: | Size: 1 KiB |
BIN
android/res/drawable-xxxhdpi/img_annual_subscription_offer.png
Executable file
After Width: | Height: | Size: 57 KiB |
BIN
android/res/drawable-xxxhdpi/img_monthly_subscription_offer.png
Executable file
After Width: | Height: | Size: 44 KiB |
6
android/res/drawable/bookmark_subscription_screen_bg.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:startColor="#b4d0ebff"
|
||||
android:endColor="#00ffffff" />
|
||||
</shape>
|
110
android/res/layout/bookmark_subscription_fragment.xml
Normal file
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white_primary"
|
||||
android:gravity="center"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<ProgressBar
|
||||
android:id="@+id/root_screen_progress"
|
||||
android:layout_width="@dimen/primary_button_min_height"
|
||||
android:layout_height="@dimen/primary_button_min_height"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:id="@+id/content_view"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:fillViewport="true">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bookmark_subscription_screen_bg"
|
||||
android:padding="@dimen/margin_base"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/text_size_title"
|
||||
android:textColor="@color/bookmark_subscription_subtitle"
|
||||
android:text="@string/native_screen_subscription_title"
|
||||
android:fontFamily="@string/robotoMedium"
|
||||
android:layout_marginRight="@dimen/height_item_oneline"
|
||||
android:layout_marginStart="@dimen/height_item_oneline"
|
||||
android:layout_marginEnd="@dimen/height_item_oneline"
|
||||
android:layout_marginLeft="@dimen/height_item_oneline"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:gravity="center"
|
||||
tools:text="Unlimited access to 5000+ guides!"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitle"
|
||||
android:layout_marginTop="@dimen/margin_base"
|
||||
tools:text="Every kind of journey. Whether alone or with friends, hiking or sunbathing"
|
||||
android:text="@string/native_screen_subscription_message"
|
||||
android:gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
android:textStyle="normal"
|
||||
android:textColor="@color/bookmark_subscription_subtitle"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
<LinearLayout
|
||||
android:layout_marginTop="@dimen/margin_base"
|
||||
android:layout_width="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content">
|
||||
<include layout="@layout/subscription_offer_card"/>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_double_and_half"
|
||||
android:layout_marginEnd="@dimen/margin_double_and_half"
|
||||
android:layout_marginLeft="@dimen/margin_double_and_half"
|
||||
android:layout_marginRight="@dimen/margin_double_and_half"
|
||||
android:layout_marginTop="@dimen/margin_double_and_half"
|
||||
android:layout_marginBottom="@dimen/margin_base"
|
||||
android:layout_gravity="center">
|
||||
<Button
|
||||
android:id="@+id/continue_btn"
|
||||
style="@style/MwmWidget.Button.Primary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/continue_download"
|
||||
tools:text="BUY FOR $1.99"/>
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="@dimen/primary_button_min_height"
|
||||
android:layout_height="@dimen/primary_button_min_height"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/restore_purchase_btn"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_marginTop="@dimen/margin_base_plus"
|
||||
android:layout_marginEnd="@dimen/margin_base_plus"
|
||||
android:layout_marginRight="@dimen/margin_base_plus"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:fontFamily="@string/robotoMedium"
|
||||
android:layout_marginLeft="@dimen/margin_base_plus"
|
||||
android:layout_marginStart="@dimen/margin_base_plus"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body3.Primary"
|
||||
tools:text="Restore purchases"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
</FrameLayout>
|
||||
|
202
android/res/layout/subscription_offer_card.xml
Normal file
|
@ -0,0 +1,202 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:id="@+id/annual_price_card"
|
||||
android:stateListAnimator="@animator/lift_on_touch"
|
||||
android:clickable="true"
|
||||
app:cardPreventCornerOverlap="false"
|
||||
app:cardUseCompatPadding="true"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/turquoise"
|
||||
app:cardCornerRadius="@dimen/margin_quarter"
|
||||
android:layout_marginRight="@dimen/margin_half"
|
||||
android:layout_marginEnd="@dimen/margin_half">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/margin_half_double_plus">
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/img_annual_subscription_offer"
|
||||
android:layout_margin="@dimen/margin_eighth"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_base"
|
||||
android:textSize="@dimen/text_size_toolbar"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@string/robotoMedium"
|
||||
android:layout_marginRight="@dimen/margin_half_double_plus"
|
||||
android:layout_marginStart="@dimen/margin_half_double_plus"
|
||||
android:layout_marginEnd="@dimen/margin_half_double_plus"
|
||||
android:layout_marginLeft="@dimen/margin_half_double_plus"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:gravity="center"
|
||||
android:lines="1"
|
||||
android:text="@string/annual_subscription_title"
|
||||
tools:text="Annual"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/margin_half_double_plus"
|
||||
android:layout_marginStart="@dimen/margin_half_double_plus"
|
||||
android:layout_marginEnd="@dimen/margin_half_double_plus"
|
||||
android:layout_marginLeft="@dimen/margin_half_double_plus"
|
||||
android:textAppearance="?android:attr/textAppearance"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
android:textStyle="normal"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:text="@string/annual_subscription_message"
|
||||
tools:text="1 month unlimited guides"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="@dimen/primary_button_min_height"
|
||||
android:layout_marginRight="@dimen/margin_half_double_plus"
|
||||
android:layout_marginStart="@dimen/margin_half_double_plus"
|
||||
android:layout_marginEnd="@dimen/margin_half_double_plus"
|
||||
android:layout_marginLeft="@dimen/margin_half_double_plus">
|
||||
<TextView
|
||||
android:id="@+id/annual_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/text_size_toolbar"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@string/robotoMedium"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:gravity="center"
|
||||
android:lines="1"
|
||||
android:text="3.99$"
|
||||
tools:text="3.99$"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearance"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
android:textStyle="normal"
|
||||
android:lines="1"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:text="@string/per_year"
|
||||
tools:text="/ mo"
|
||||
tools:ignore="UnusedAttribute"
|
||||
android:layout_marginStart="@dimen/margin_quarter"
|
||||
android:layout_marginLeft="@dimen/margin_quarter"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
<android.support.v7.widget.CardView
|
||||
android:id="@+id/monthly_price_card"
|
||||
android:stateListAnimator="@animator/lift_on_touch"
|
||||
android:clickable="true"
|
||||
app:cardPreventCornerOverlap="false"
|
||||
app:cardUseCompatPadding="true"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/cardBackground"
|
||||
app:cardCornerRadius="@dimen/margin_quarter"
|
||||
android:layout_marginLeft="@dimen/margin_half"
|
||||
android:layout_marginStart="@dimen/margin_half"
|
||||
android:focusable="true">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/margin_half_double_plus">
|
||||
<ImageView
|
||||
android:src="@drawable/img_monthly_subscription_offer"
|
||||
android:layout_margin="@dimen/margin_eighth"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_base"
|
||||
android:textSize="@dimen/text_size_toolbar"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@string/robotoMedium"
|
||||
android:layout_marginRight="@dimen/margin_half_double_plus"
|
||||
android:layout_marginStart="@dimen/margin_half_double_plus"
|
||||
android:layout_marginEnd="@dimen/margin_half_double_plus"
|
||||
android:layout_marginLeft="@dimen/margin_half_double_plus"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:gravity="center"
|
||||
android:lines="1"
|
||||
android:text="@string/montly_subscription_title"
|
||||
tools:text="Annual"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/margin_half_double_plus"
|
||||
android:layout_marginStart="@dimen/margin_half_double_plus"
|
||||
android:layout_marginEnd="@dimen/margin_half_double_plus"
|
||||
android:layout_marginLeft="@dimen/margin_half_double_plus"
|
||||
android:textAppearance="?android:attr/textAppearance"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
android:textStyle="normal"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:text="@string/montly_subscription_message"
|
||||
tools:text="1 month unlimited guides"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="@dimen/primary_button_min_height"
|
||||
android:layout_marginRight="@dimen/margin_half_double_plus"
|
||||
android:layout_marginStart="@dimen/margin_half_double_plus"
|
||||
android:layout_marginEnd="@dimen/margin_half_double_plus"
|
||||
android:layout_marginLeft="@dimen/margin_half_double_plus">
|
||||
<TextView
|
||||
android:id="@+id/monthly_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/text_size_toolbar"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@string/robotoMedium"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:gravity="center"
|
||||
android:lines="1"
|
||||
android:text="3.99$"
|
||||
tools:text="3.99$"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearance"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
android:textStyle="normal"
|
||||
android:lines="1"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:text="@string/per_month"
|
||||
tools:text="/ mo"
|
||||
tools:ignore="UnusedAttribute"
|
||||
android:layout_marginStart="@dimen/margin_quarter"
|
||||
android:layout_marginLeft="@dimen/margin_quarter"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
|
@ -200,4 +200,7 @@
|
|||
<color name="tips_and_triks_primary_text_night">#000000</color>
|
||||
<color name="tips_and_triks_secondary_text">#B3FFFFFF</color>
|
||||
<color name="tips_and_triks_secondary_text_night">@color/dark_gray</color>
|
||||
<color name="turquoise">#d0f6ff</color>
|
||||
<color name="bookmark_subscription_subtitle">#c6152b1c</color>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -98,4 +98,6 @@
|
|||
<string name="auto_enum_value" translatable="false">AUTO</string>
|
||||
<string name="placepage_toolbar_behavior" translatable="false">com.mapswithme.maps.widget.placepage.ToolbarBehavior</string>
|
||||
<string name="placepage_behavior" translatable="false">com.trafi.anchorbottomsheetbehavior.AnchorBottomSheetBehavior</string>
|
||||
<string name="restore_purchase_link"><a href="%s">%s</a></string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package com.mapswithme.maps.bookmarks;
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
import com.mapswithme.maps.base.BaseMwmFragmentActivity;
|
||||
|
||||
public class BookmarkSubscriptionActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
@Override
|
||||
protected Class<? extends Fragment> getFragmentClass()
|
||||
{
|
||||
return BookmarkSubscriptionFragment.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean useTransparentStatusBar()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,116 @@
|
|||
package com.mapswithme.maps.bookmarks;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.CardView;
|
||||
import android.text.Html;
|
||||
import android.text.Spanned;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.maps.base.BaseMwmFragment;
|
||||
import com.mapswithme.maps.discovery.DiscoveryManager;
|
||||
|
||||
public class BookmarkSubscriptionFragment extends BaseMwmFragment
|
||||
{
|
||||
private static final int DEF_ELEVATION = 0;
|
||||
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@NonNull
|
||||
private View mContentView;
|
||||
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@NonNull
|
||||
private View mRootScreenProgress;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)
|
||||
{
|
||||
View root = inflater.inflate(R.layout.bookmark_subscription_fragment, container, false);
|
||||
mContentView = root.findViewById(R.id.content_view);
|
||||
mRootScreenProgress = root.findViewById(R.id.root_screen_progress);
|
||||
CardView annualPriceCard = root.findViewById(R.id.annual_price_card);
|
||||
CardView monthlyPriceCard = root.findViewById(R.id.monthly_price_card);
|
||||
AnnualCardClickListener annualCardListener = new AnnualCardClickListener(monthlyPriceCard,
|
||||
annualPriceCard);
|
||||
annualPriceCard.setOnClickListener(annualCardListener);
|
||||
MonthlyCardClickListener monthlyCardListener = new MonthlyCardClickListener(monthlyPriceCard,
|
||||
annualPriceCard);
|
||||
monthlyPriceCard.setOnClickListener(monthlyCardListener);
|
||||
annualPriceCard.setCardElevation(getResources().getDimension(R.dimen.margin_base_plus_quarter));
|
||||
TextView restorePurchasesLink = root.findViewById(R.id.restore_purchase_btn);
|
||||
|
||||
final Spanned html = makeRestorePurchaseHtml(requireContext());
|
||||
restorePurchasesLink.setText(html);
|
||||
restorePurchasesLink.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
return root;
|
||||
}
|
||||
|
||||
private void showContent()
|
||||
{
|
||||
mContentView.setVisibility(View.VISIBLE);
|
||||
mRootScreenProgress.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private static Spanned makeRestorePurchaseHtml(@NonNull Context context)
|
||||
{
|
||||
final String restorePurchaseSrc = context.getString(R.string.download);
|
||||
final String restorePurchaseLink = "";
|
||||
return Html.fromHtml(context.getString(R.string.restore_purchase_link,
|
||||
restorePurchaseLink,
|
||||
restorePurchaseSrc));
|
||||
}
|
||||
|
||||
private class AnnualCardClickListener implements View.OnClickListener
|
||||
{
|
||||
@NonNull
|
||||
private final CardView mMonthlyPriceCard;
|
||||
|
||||
@NonNull
|
||||
private final CardView mAnnualPriceCard;
|
||||
|
||||
public AnnualCardClickListener(@NonNull CardView monthlyPriceCard,
|
||||
@NonNull CardView annualPriceCard)
|
||||
{
|
||||
mMonthlyPriceCard = monthlyPriceCard;
|
||||
mAnnualPriceCard = annualPriceCard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
mMonthlyPriceCard.setCardElevation(DEF_ELEVATION);
|
||||
mAnnualPriceCard.setCardElevation(getResources().getDimension(R.dimen.margin_base_plus_quarter));
|
||||
}
|
||||
}
|
||||
|
||||
private class MonthlyCardClickListener implements View.OnClickListener
|
||||
{
|
||||
@NonNull
|
||||
private final CardView mMonthlyPriceCard;
|
||||
|
||||
@NonNull
|
||||
private final CardView mAnnualPriceCard;
|
||||
|
||||
public MonthlyCardClickListener(@NonNull CardView monthlyPriceCard,
|
||||
@NonNull CardView annualPriceCard)
|
||||
{
|
||||
mMonthlyPriceCard = monthlyPriceCard;
|
||||
mAnnualPriceCard = annualPriceCard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
mMonthlyPriceCard.setCardElevation(getResources().getDimension(R.dimen.margin_base_plus_quarter));
|
||||
mAnnualPriceCard.setCardElevation(DEF_ELEVATION);
|
||||
}
|
||||
}
|
||||
}
|