Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-12-07 11:02:30 +01:00
commit 98a12d3549
4 changed files with 96 additions and 101 deletions

View file

@ -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">
<LinearLayout
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<net.osmand.plus.widgets.TextViewEx
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/shared_string_on"
app:textAllCapsCompat="true"/>
<include
layout="@layout/check_item_rel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="14dp"
android:layout_marginRight="14dp"
android:layout_marginTop="14dp"
android:background="?attr/bg_card"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:minHeight="44dp"
android:layout_height="wrap_content"
android:gravity="center">
<net.osmand.plus.widgets.TextViewEx
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:text="Subscription status"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
app:typeface="@string/font_roboto_regular"/>
<net.osmand.plus.widgets.TextViewEx
android:text="Work"
android:id="@+id/nameTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
app:typeface="@string/font_roboto_medium"
tools:text="very very very long poi name"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<LinearLayout
android:layout_width="match_parent"
android:minHeight="44dp"
android:layout_height="wrap_content"
android:gravity="center">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/amenityTagTextView"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:text="@string/tag_poi_amenity"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
app:typeface="@string/font_roboto_regular"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="?attr/dashboard_divider"/>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/amenityTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
app:typeface="@string/font_roboto_medium"
tools:text="landmark"/>
</LinearLayout>
</LinearLayout>
android:layout_height="match_parent"/>
</LinearLayout>

View file

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<net.osmand.plus.widgets.TextViewEx
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/shared_string_on"
app:textAllCapsCompat="true"/>
<include
layout="@layout/check_item_rel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="14dp"
android:layout_marginRight="14dp"
android:layout_marginTop="14dp"
android:background="?attr/bg_card"
android:orientation="vertical"
tools:showIn="@layout/fragment_live_updates">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:minHeight="44dp">
<net.osmand.plus.widgets.TextViewEx
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:text="Subscription status"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
app:typeface="@string/font_roboto_regular"/>
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/nameTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="4dp"
android:text="Work"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
app:typeface="@string/font_roboto_medium"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:minHeight="44dp">
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Available maps"/>
</merge>

View file

@ -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;
}
}

View file

@ -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<OsmPoint, String> loadErrorsMap) {
super.uploadEnded(loadErrorsMap);
if (!DashOsmEditsFragment.this.isDetached()) {
if (DashOsmEditsFragment.this.isAdded()) {
onOpenDash();
}
}