Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Yunitsky <yunik@mapswithme.com>2015-03-18 18:35:41 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:40:15 +0300
commit288e8af7c9d54a6fe7562c136a394867b6ee6582 (patch)
tree9505ad081f07f064e80283e1335549b7aefea7b2
parent4cb2d80411dffe1e9c7da6fe3d93437ff667f72d (diff)
Displayed elevation for peaks.
-rw-r--r--android/res/drawable-hdpi/ic_high_mountain.pngbin0 -> 288 bytes
-rw-r--r--android/res/drawable-mdpi/ic_high_mountain.pngbin0 -> 205 bytes
-rw-r--r--android/res/drawable-xhdpi/ic_high_mountain.pngbin0 -> 349 bytes
-rw-r--r--android/res/drawable-xxhdpi/ic_high_mountain.pngbin0 -> 517 bytes
-rw-r--r--android/res/layout/place_page_details_common.xml1
-rw-r--r--android/res/layout/place_page_preview_common.xml13
-rw-r--r--android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java11
7 files changed, 23 insertions, 2 deletions
diff --git a/android/res/drawable-hdpi/ic_high_mountain.png b/android/res/drawable-hdpi/ic_high_mountain.png
new file mode 100644
index 0000000000..60644268b8
--- /dev/null
+++ b/android/res/drawable-hdpi/ic_high_mountain.png
Binary files differ
diff --git a/android/res/drawable-mdpi/ic_high_mountain.png b/android/res/drawable-mdpi/ic_high_mountain.png
new file mode 100644
index 0000000000..11c90f22b1
--- /dev/null
+++ b/android/res/drawable-mdpi/ic_high_mountain.png
Binary files differ
diff --git a/android/res/drawable-xhdpi/ic_high_mountain.png b/android/res/drawable-xhdpi/ic_high_mountain.png
new file mode 100644
index 0000000000..23199b620f
--- /dev/null
+++ b/android/res/drawable-xhdpi/ic_high_mountain.png
Binary files differ
diff --git a/android/res/drawable-xxhdpi/ic_high_mountain.png b/android/res/drawable-xxhdpi/ic_high_mountain.png
new file mode 100644
index 0000000000..756aa81ec9
--- /dev/null
+++ b/android/res/drawable-xxhdpi/ic_high_mountain.png
Binary files differ
diff --git a/android/res/layout/place_page_details_common.xml b/android/res/layout/place_page_details_common.xml
index 6c167003f2..77435c0969 100644
--- a/android/res/layout/place_page_details_common.xml
+++ b/android/res/layout/place_page_details_common.xml
@@ -35,7 +35,6 @@
<View
android:layout_width="match_parent"
android:layout_height="0px"
- android:layout_marginTop="@dimen/margin_small"
android:layout_marginBottom="@dimen/margin_small"/>
<include
diff --git a/android/res/layout/place_page_preview_common.xml b/android/res/layout/place_page_preview_common.xml
index 87c2ca8823..9698e11c90 100644
--- a/android/res/layout/place_page_preview_common.xml
+++ b/android/res/layout/place_page_preview_common.xml
@@ -18,6 +18,7 @@
<TextView
android:id="@+id/tv__subtitle"
android:layout_width="wrap_content"
+ android:layout_marginRight="@dimen/margin_medium"
android:layout_height="wrap_content"
android:layout_below="@id/tv__title"
android:textColor="@color/text_place_page_subtitle"
@@ -41,11 +42,21 @@
android:numStars="5"
android:stepSize="1"
android:progressDrawable="@drawable/rating_bar_stars"
- android:layout_marginLeft="@dimen/margin_small"
android:layout_toRightOf="@id/tv__subtitle"
android:layout_alignBottom="@id/tv__subtitle"
android:visibility="gone"/>
+ <TextView
+ android:id="@+id/tv__peak_elevation"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:drawableLeft="@drawable/ic_high_mountain"
+ android:layout_toRightOf="@id/tv__subtitle"
+ android:layout_alignBottom="@id/tv__subtitle"
+ android:textColor="@color/text_place_page_subtitle"
+ android:textSize="@dimen/place_page_subtitle"
+ android:visibility="gone"/>
+
</RelativeLayout>
<TextView
diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java
index 9a4706b8f5..b1358794ec 100644
--- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java
+++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java
@@ -63,6 +63,7 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
private ArrowView mAvDirection;
private TextView mTvDistance;
private RatingBar mRbStars;
+ private TextView mTvElevation;
// Place page details
private ViewGroup mPpDetails;
private LinearLayout mLlAddress;
@@ -143,6 +144,7 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
mAvDirection.setOnClickListener(this);
mAvDirection.setImageResource(R.drawable.selector_direction);
mRbStars = (RatingBar) ppPreview.findViewById(R.id.rb__stars);
+ mTvElevation = (TextView) ppPreview.findViewById(R.id.tv__peak_elevation);
mPpDetails = (ViewGroup) findViewById(R.id.pp__details);
mLlAddress = (LinearLayout) mPpDetails.findViewById(R.id.ll__place_name);
@@ -375,6 +377,15 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
refreshMetadataOrHide(null, mLlSchedule, mTvSchedule);
refreshMetadataStars(mMapObject.getMetadata(Metadata.MetadataType.FMD_STARS));
+
+ final String elevation = mMapObject.getMetadata(Metadata.MetadataType.FMD_ELE);
+ if (!TextUtils.isEmpty(elevation))
+ {
+ mTvElevation.setVisibility(View.VISIBLE);
+ mTvElevation.setText(elevation);
+ }
+ else
+ mTvElevation.setVisibility(View.GONE);
}
private void refreshButtons(boolean showBackButton)