From cf4596752f7a223bc1e25f64b538a8709ce84905 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Fri, 29 Jan 2016 21:13:48 +0300 Subject: [PATCH] Live updates InApp done --- OsmAnd/no_translate.xml | 1 + OsmAnd/res/layout/card_bottom_divider.xml | 1 + OsmAnd/res/layout/card_top_divider.xml | 1 + OsmAnd/res/layout/fragment_live_updates.xml | 39 +- OsmAnd/res/layout/fragment_reports.xml | 4 +- OsmAnd/res/layout/fragment_search_list.xml | 22 +- .../layout/list_group_title_with_switch.xml | 9 +- OsmAnd/res/layout/live_updates_header.xml | 28 +- OsmAnd/res/layout/shadow_bottom.xml | 10 - OsmAnd/res/layout/shadow_top.xml | 9 - OsmAnd/res/layout/subscription_fragment.xml | 348 +++++++++--------- .../net/osmand/plus/OsmandApplication.java | 7 - .../net/osmand/plus/inapp/InAppHelper.java | 123 ++++--- .../plus/liveupdates/LiveUpdatesFragment.java | 175 ++++++--- .../plus/liveupdates/OsmLiveActivity.java | 14 +- .../liveupdates/SubscriptionFragment.java | 49 ++- 16 files changed, 467 insertions(+), 373 deletions(-) delete mode 100644 OsmAnd/res/layout/shadow_bottom.xml delete mode 100644 OsmAnd/res/layout/shadow_top.xml diff --git a/OsmAnd/no_translate.xml b/OsmAnd/no_translate.xml index dce32232f1..7471ced1a9 100644 --- a/OsmAnd/no_translate.xml +++ b/OsmAnd/no_translate.xml @@ -43,6 +43,7 @@ Thank you for subscribing to live updates! Part your donation will be sent to OSM users who submit changes to the map in that region Subscription settings + Please purchase OSM Live subscription first This subscription enables hourly updates for all maps around the world. Major part of the income goes back to OSM community and is paid out per each OSM contribution. diff --git a/OsmAnd/res/layout/card_bottom_divider.xml b/OsmAnd/res/layout/card_bottom_divider.xml index 864a1aaf4c..8cfc595755 100644 --- a/OsmAnd/res/layout/card_bottom_divider.xml +++ b/OsmAnd/res/layout/card_bottom_divider.xml @@ -1,5 +1,6 @@ diff --git a/OsmAnd/res/layout/card_top_divider.xml b/OsmAnd/res/layout/card_top_divider.xml index 32ffcaefba..b2036ad492 100644 --- a/OsmAnd/res/layout/card_top_divider.xml +++ b/OsmAnd/res/layout/card_top_divider.xml @@ -1,5 +1,6 @@ diff --git a/OsmAnd/res/layout/fragment_live_updates.xml b/OsmAnd/res/layout/fragment_live_updates.xml index b46d523d04..dd7b00a096 100644 --- a/OsmAnd/res/layout/fragment_live_updates.xml +++ b/OsmAnd/res/layout/fragment_live_updates.xml @@ -1,13 +1,30 @@ - + android:layout_height="match_parent"> + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/fragment_reports.xml b/OsmAnd/res/layout/fragment_reports.xml index ef70be617d..12f99f4ac2 100644 --- a/OsmAnd/res/layout/fragment_reports.xml +++ b/OsmAnd/res/layout/fragment_reports.xml @@ -6,7 +6,7 @@ android:orientation="vertical" tools:context="net.osmand.plus.liveupdates.ReportsFragment"> - + - + diff --git a/OsmAnd/res/layout/fragment_search_list.xml b/OsmAnd/res/layout/fragment_search_list.xml index 152871c0b8..3a1880d00b 100644 --- a/OsmAnd/res/layout/fragment_search_list.xml +++ b/OsmAnd/res/layout/fragment_search_list.xml @@ -23,19 +23,25 @@ android:id="@+id/searchEditText" android:layout_width="match_parent" android:layout_height="match_parent" + android:layout_marginLeft="16dp" + android:background="@null" android:gravity="center_vertical" android:lines="1" - android:background="@null" - android:layout_marginLeft="16dp" tools:text="Search request"/> - - - + android:layout_height="match_parent"> + + + + + + diff --git a/OsmAnd/res/layout/list_group_title_with_switch.xml b/OsmAnd/res/layout/list_group_title_with_switch.xml index d85ee2a791..bc592e98ae 100644 --- a/OsmAnd/res/layout/list_group_title_with_switch.xml +++ b/OsmAnd/res/layout/list_group_title_with_switch.xml @@ -6,14 +6,14 @@ android:layout_height="64dp" android:orientation="vertical"> - + - + - - \ 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 2cbff37160..0f7be308ec 100644 --- a/OsmAnd/res/layout/live_updates_header.xml +++ b/OsmAnd/res/layout/live_updates_header.xml @@ -7,7 +7,7 @@ android:orientation="vertical" android:paddingLeft="8dp" android:paddingRight="8dp" - android:paddingTop="8dp"> + android:paddingTop="16dp"> - - - - -