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 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; } + } 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(); } }