From 1060c2a2d922c231be28b6a41f6833afa8031cfa Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Mon, 7 Dec 2015 11:35:37 +0200 Subject: [PATCH 1/3] Unpolished layout ready. --- OsmAnd/res/layout/fragment_live_updates.xml | 102 +------------------- OsmAnd/res/layout/live_updates_header.xml | 85 ++++++++++++++++ 2 files changed, 89 insertions(+), 98 deletions(-) create mode 100644 OsmAnd/res/layout/live_updates_header.xml diff --git a/OsmAnd/res/layout/fragment_live_updates.xml b/OsmAnd/res/layout/fragment_live_updates.xml index 66ed3ba820..36bbc04b70 100644 --- a/OsmAnd/res/layout/fragment_live_updates.xml +++ b/OsmAnd/res/layout/fragment_live_updates.xml @@ -2,105 +2,11 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - xmlns:app="http://schemas.android.com/apk/res-auto" + android:orientation="vertical" tools:context=".liveupdates.LiveUpdatesFragment"> - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:layout_height="match_parent"/> diff --git a/OsmAnd/res/layout/live_updates_header.xml b/OsmAnd/res/layout/live_updates_header.xml new file mode 100644 index 0000000000..fef589210f --- /dev/null +++ b/OsmAnd/res/layout/live_updates_header.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 1e8bd72692033f654d7467686037f612170cd1ec Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Mon, 7 Dec 2015 11:38:11 +0200 Subject: [PATCH 2/3] Live updates fragment in progress --- .../net/osmand/plus/LiveUpdates/LiveUpdatesFragment.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/LiveUpdates/LiveUpdatesFragment.java b/OsmAnd/src/net/osmand/plus/LiveUpdates/LiveUpdatesFragment.java index a890c9f7d0..2cb2d470ba 100644 --- a/OsmAnd/src/net/osmand/plus/LiveUpdates/LiveUpdatesFragment.java +++ b/OsmAnd/src/net/osmand/plus/LiveUpdates/LiveUpdatesFragment.java @@ -6,6 +6,7 @@ import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.ListView; import net.osmand.plus.R; @@ -25,7 +26,10 @@ public class LiveUpdatesFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - return inflater.inflate(R.layout.fragment_live_updates, container, false); + final View view = inflater.inflate(R.layout.fragment_live_updates, container, false); + ListView listView = (ListView) view.findViewById(android.R.id.list); + return view; } + } From 72fa967101f8378f58bdd6dd159b152eaf9b85e3 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Mon, 7 Dec 2015 11:59:43 +0200 Subject: [PATCH 3/3] Fix #1776 : app crashes when you rotate the screen when uploading to OSM --- OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java index be8dcf6be9..d527522b78 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java @@ -161,7 +161,7 @@ public class DashOsmEditsFragment extends DashBaseFragment @Override public void uploadUpdated(OsmPoint point) { super.uploadUpdated(point); - if (!DashOsmEditsFragment.this.isDetached()) { + if (DashOsmEditsFragment.this.isAdded()) { onOpenDash(); } } @@ -169,7 +169,7 @@ public class DashOsmEditsFragment extends DashBaseFragment @Override public void uploadEnded(Map loadErrorsMap) { super.uploadEnded(loadErrorsMap); - if (!DashOsmEditsFragment.this.isDetached()) { + if (DashOsmEditsFragment.this.isAdded()) { onOpenDash(); } }