From 2724df5f0ec1cb5de60b8ab0aa29a4809d5fc537 Mon Sep 17 00:00:00 2001 From: crimean Date: Thu, 1 Nov 2018 19:16:58 +0300 Subject: [PATCH] Added new subscriptions - merge --- OsmAnd/no_translate.xml | 7 +- .../res/drawable/btn_round_border_dark_2.xml | 9 + .../res/drawable/btn_round_border_light_2.xml | 9 + .../drawable/text_rounded_bg_active_dark.xml | 8 + .../drawable/text_rounded_bg_active_light.xml | 8 + .../drawable/text_rounded_bg_regular_dark.xml | 5 + .../text_rounded_bg_regular_light.xml | 5 + OsmAnd/res/layout/live_updates_header.xml | 35 +- .../layout/purchase_dialog_active_card.xml | 52 -- .../purchase_dialog_card_button_active_ex.xml | 151 +++ .../layout/purchase_dialog_card_button_ex.xml | 134 +++ .../layout/purchase_dialog_osm_live_card.xml | 69 ++ OsmAnd/res/layout/subscription_fragment.xml | 101 +- OsmAnd/res/values/attrs.xml | 9 +- OsmAnd/res/values/colors.xml | 5 + OsmAnd/res/values/sizes.xml | 4 + OsmAnd/res/values/strings.xml | 13 + OsmAnd/res/values/styles.xml | 18 +- .../src/net/osmand/AndroidNetworkUtils.java | 69 +- .../src/net/osmand/plus/AppInitializer.java | 2 +- .../src/net/osmand/plus/OsmandSettings.java | 1 + .../OsmandInAppPurchaseActivity.java | 2 +- .../chooseplan/ChoosePlanDialogFragment.java | 268 ++++-- .../ChoosePlanFreeBannerDialogFragment.java | 7 +- ...ChoosePlanHillshadeSrtmDialogFragment.java | 7 +- .../ChoosePlanSeaDepthMapsDialogFragment.java | 7 +- .../ChoosePlanWikipediaDialogFragment.java | 1 - .../chooseplan/OsmLiveCancelledDialog.java | 18 +- .../osmand/plus/helpers/DiscountHelper.java | 33 +- .../plus/inapp/InAppPurchaseHelper.java | 429 +++++---- .../net/osmand/plus/inapp/InAppPurchases.java | 859 ++++++++++++++++++ .../net/osmand/plus/inapp/util/Inventory.java | 4 +- .../osmand/plus/inapp/util/SkuDetails.java | 15 + .../plus/liveupdates/LiveUpdatesFragment.java | 88 +- .../plus/liveupdates/OsmLiveActivity.java | 11 +- .../liveupdates/SubscriptionFragment.java | 176 ++-- 36 files changed, 2033 insertions(+), 606 deletions(-) create mode 100644 OsmAnd/res/drawable/btn_round_border_dark_2.xml create mode 100644 OsmAnd/res/drawable/btn_round_border_light_2.xml create mode 100644 OsmAnd/res/drawable/text_rounded_bg_active_dark.xml create mode 100644 OsmAnd/res/drawable/text_rounded_bg_active_light.xml create mode 100644 OsmAnd/res/drawable/text_rounded_bg_regular_dark.xml create mode 100644 OsmAnd/res/drawable/text_rounded_bg_regular_light.xml delete mode 100644 OsmAnd/res/layout/purchase_dialog_active_card.xml create mode 100644 OsmAnd/res/layout/purchase_dialog_card_button_active_ex.xml create mode 100644 OsmAnd/res/layout/purchase_dialog_card_button_ex.xml create mode 100644 OsmAnd/res/layout/purchase_dialog_osm_live_card.xml create mode 100644 OsmAnd/src/net/osmand/plus/inapp/InAppPurchases.java diff --git a/OsmAnd/no_translate.xml b/OsmAnd/no_translate.xml index 4f310b48ec..be266d95a0 100644 --- a/OsmAnd/no_translate.xml +++ b/OsmAnd/no_translate.xml @@ -24,7 +24,12 @@ Tag Value - €1,49 + €1,49 + €1,99 + €3,99 + €1,33 + €7,99 + €2,66 https://twitter.com/osmandapp https://www.facebook.com/osmandapp https://vk.com/osmandapp diff --git a/OsmAnd/res/drawable/btn_round_border_dark_2.xml b/OsmAnd/res/drawable/btn_round_border_dark_2.xml new file mode 100644 index 0000000000..5e6a95c5ca --- /dev/null +++ b/OsmAnd/res/drawable/btn_round_border_dark_2.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/btn_round_border_light_2.xml b/OsmAnd/res/drawable/btn_round_border_light_2.xml new file mode 100644 index 0000000000..28b70eaacb --- /dev/null +++ b/OsmAnd/res/drawable/btn_round_border_light_2.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/text_rounded_bg_active_dark.xml b/OsmAnd/res/drawable/text_rounded_bg_active_dark.xml new file mode 100644 index 0000000000..f5de3e9de0 --- /dev/null +++ b/OsmAnd/res/drawable/text_rounded_bg_active_dark.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/text_rounded_bg_active_light.xml b/OsmAnd/res/drawable/text_rounded_bg_active_light.xml new file mode 100644 index 0000000000..7d69b928f8 --- /dev/null +++ b/OsmAnd/res/drawable/text_rounded_bg_active_light.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/text_rounded_bg_regular_dark.xml b/OsmAnd/res/drawable/text_rounded_bg_regular_dark.xml new file mode 100644 index 0000000000..17ace62642 --- /dev/null +++ b/OsmAnd/res/drawable/text_rounded_bg_regular_dark.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/text_rounded_bg_regular_light.xml b/OsmAnd/res/drawable/text_rounded_bg_regular_light.xml new file mode 100644 index 0000000000..68edc5de9d --- /dev/null +++ b/OsmAnd/res/drawable/text_rounded_bg_regular_light.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/live_updates_header.xml b/OsmAnd/res/layout/live_updates_header.xml index 1e020e9598..c67af7caab 100644 --- a/OsmAnd/res/layout/live_updates_header.xml +++ b/OsmAnd/res/layout/live_updates_header.xml @@ -1,9 +1,9 @@ - + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/purchase_dialog_active_card.xml b/OsmAnd/res/layout/purchase_dialog_active_card.xml deleted file mode 100644 index ef4ebd43cb..0000000000 --- a/OsmAnd/res/layout/purchase_dialog_active_card.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OsmAnd/res/layout/purchase_dialog_card_button_active_ex.xml b/OsmAnd/res/layout/purchase_dialog_card_button_active_ex.xml new file mode 100644 index 0000000000..5647137c1f --- /dev/null +++ b/OsmAnd/res/layout/purchase_dialog_card_button_active_ex.xml @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OsmAnd/res/layout/purchase_dialog_card_button_ex.xml b/OsmAnd/res/layout/purchase_dialog_card_button_ex.xml new file mode 100644 index 0000000000..6a6a208620 --- /dev/null +++ b/OsmAnd/res/layout/purchase_dialog_card_button_ex.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OsmAnd/res/layout/purchase_dialog_osm_live_card.xml b/OsmAnd/res/layout/purchase_dialog_osm_live_card.xml new file mode 100644 index 0000000000..de4c962b2e --- /dev/null +++ b/OsmAnd/res/layout/purchase_dialog_osm_live_card.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/subscription_fragment.xml b/OsmAnd/res/layout/subscription_fragment.xml index df72477715..f4401d074b 100644 --- a/OsmAnd/res/layout/subscription_fragment.xml +++ b/OsmAnd/res/layout/subscription_fragment.xml @@ -277,7 +277,7 @@ android:layout_height="wrap_content" android:layout_marginBottom="16dp" android:layout_marginTop="16dp" - android:visibility="gone"> + android:visibility="visible">