forked from organicmaps/organicmaps-tmp
Ui fixes.
This commit is contained in:
parent
2b4bddf408
commit
e4a1650cad
14 changed files with 189 additions and 145 deletions
|
@ -4,7 +4,7 @@
|
|||
android:left="@dimen/margin_medium"
|
||||
android:right="@dimen/margin_medium">
|
||||
<shape>
|
||||
<solid android:color="@color/bg_menu"/>
|
||||
<solid android:color="@color/divider_standart"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
|
@ -17,8 +17,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:background="@color/bg_top_panels"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/margin_small"
|
||||
android:paddingLeft="@dimen/margin_medium">
|
||||
android:paddingBottom="@dimen/margin_small"
|
||||
android:paddingLeft="@dimen/margin_medium"
|
||||
android:paddingRight="@dimen/margin_small"
|
||||
android:paddingTop="@dimen/margin_small">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -53,7 +55,8 @@
|
|||
android:layout_below="@id/info_title"
|
||||
android:fontFamily="@string/robotoLight"
|
||||
android:paddingRight="5dp"
|
||||
android:textColor="@color/text_info_box"/>
|
||||
android:textColor="@color/text_info_box"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_route_from"
|
||||
|
@ -77,9 +80,10 @@
|
|||
android:id="@+id/info_box_is_bookmarked"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="-8dp"
|
||||
android:layout_weight="0"
|
||||
android:button="@drawable/ic_bookmarks_selector"
|
||||
android:padding="8dp"/>
|
||||
android:padding="@dimen/margin_small"/>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
|
@ -99,6 +103,8 @@
|
|||
android:layout_below="@id/preview"
|
||||
android:background="@color/bg_top_panels"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/margin_small"
|
||||
android:paddingRight="@dimen/margin_small"
|
||||
android:visibility="gone">
|
||||
|
||||
<View
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp" >
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/info_box_geo_ref"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/info_box_geo" />
|
||||
<include
|
||||
android:id="@+id/info_box_geo_ref"
|
||||
layout="@layout/info_box_geo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<include
|
||||
layout="@layout/info_box_bottom_buttons" />
|
||||
<View
|
||||
style="@style/drawerSeparatorNoPadding"/>
|
||||
|
||||
<include
|
||||
layout="@layout/info_box_bottom_buttons"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -1,17 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp" >
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/info_box_geo_ref"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/info_box_geo" />
|
||||
<include
|
||||
android:id="@+id/info_box_geo_ref"
|
||||
layout="@layout/info_box_geo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<include
|
||||
layout="@layout/info_box_bottom_buttons" />
|
||||
<View
|
||||
style="@style/drawerSeparatorNoPadding"/>
|
||||
|
||||
<include
|
||||
layout="@layout/info_box_bottom_buttons"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -1,24 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp" >
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/info_box_geo_ref"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/info_box_geo" />
|
||||
<include
|
||||
android:id="@+id/info_box_geo_ref"
|
||||
layout="@layout/info_box_geo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<WebView
|
||||
android:id="@+id/info_box_bookmark_descr"
|
||||
style="@style/infoItem"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" />
|
||||
<WebView
|
||||
android:id="@+id/info_box_bookmark_descr"
|
||||
style="@style/infoItem"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"/>
|
||||
|
||||
<include
|
||||
layout="@layout/info_box_bottom_buttons" />
|
||||
<View
|
||||
style="@style/drawerSeparatorNoPadding"/>
|
||||
|
||||
<include
|
||||
layout="@layout/info_box_bottom_buttons"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -2,6 +2,7 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/pp_button_height"
|
||||
android:layout_marginBottom="@dimen/margin_small"
|
||||
android:layout_marginTop="@dimen/margin_small"
|
||||
android:gravity="top"
|
||||
android:orientation="horizontal">
|
||||
|
|
|
@ -3,37 +3,44 @@
|
|||
android:id="@+id/info_box_geo"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/margin_small"
|
||||
android:paddingTop="@dimen/margin_small">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/info_box_geo_container_dist"
|
||||
<com.mapswithme.maps.widget.ArrowView
|
||||
android:id="@+id/av_direction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="top"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.mapswithme.maps.widget.ArrowView
|
||||
android:id="@+id/av_direction"
|
||||
android:layout_width="@dimen/margin_large"
|
||||
android:layout_height="@dimen/margin_large"
|
||||
android:layout_marginRight="@dimen/margin_small"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/info_box_geo_distance"
|
||||
style="@style/Holo.TextAppearance.Medium.Light"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
android:textColor="@color/text_info_box"/>
|
||||
</LinearLayout>
|
||||
android:layout_marginRight="@dimen/margin_small"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/info_box_geo_location"
|
||||
android:id="@+id/info_box_geo_distance"
|
||||
style="@style/Holo.TextAppearance.Medium.Light"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/info_box_geo_container_dist"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_toRightOf="@id/av_direction"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
android:textColor="@color/text_info_box"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/info_box_lat"
|
||||
style="@style/Holo.TextAppearance.Medium.Light"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/info_box_geo_distance"
|
||||
android:layout_toRightOf="@id/av_direction"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
android:textColor="@color/text_info_box"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/info_box_lon"
|
||||
style="@style/Holo.TextAppearance.Medium.Light"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/info_box_lat"
|
||||
android:layout_marginTop="-4dp"
|
||||
android:layout_toRightOf="@id/av_direction"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
android:textColor="@color/text_info_box"/>
|
||||
|
||||
|
@ -43,8 +50,6 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_below="@id/info_box_geo_container_dist"
|
||||
android:layout_marginRight="@dimen/margin_small"
|
||||
android:background="@android:color/transparent"/>
|
||||
|
||||
</RelativeLayout>
|
|
@ -1,17 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp" >
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/info_box_geo_ref"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
layout="@layout/info_box_geo" />
|
||||
<include
|
||||
android:id="@+id/info_box_geo_ref"
|
||||
layout="@layout/info_box_geo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<include
|
||||
layout="@layout/info_box_bottom_buttons" />
|
||||
<View
|
||||
style="@style/drawerSeparatorNoPadding"/>
|
||||
|
||||
<include
|
||||
layout="@layout/info_box_bottom_buttons"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -47,7 +47,7 @@
|
|||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
android:fontFamily="@string/robotoLight"
|
||||
android:imeOptions="actionDone|flagNoExtractUi"
|
||||
android:inputType="text"
|
||||
android:padding="@dimen/margin_tiny"
|
||||
|
|
|
@ -5,11 +5,13 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_toolbar_button_selector"
|
||||
android:gravity="center_vertical"
|
||||
android:gravity="top"
|
||||
android:minHeight="@dimen/search_item_height"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="@dimen/margin_small"
|
||||
android:paddingLeft="@dimen/margin_medium"
|
||||
android:paddingRight="@dimen/margin_medium">
|
||||
android:paddingRight="@dimen/margin_medium"
|
||||
android:paddingTop="@dimen/margin_small">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_search_image"
|
||||
|
@ -39,21 +41,25 @@
|
|||
android:ellipsize="end"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
android:textAppearance="@style/Holo.TextAppearance.Small.Light"
|
||||
android:textColor="@color/text_search_item"/>
|
||||
android:textColor="@color/text_search_item"
|
||||
android:textSize="13sp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:gravity="right"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="6dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_search_item_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
android:gravity="top"
|
||||
android:textAppearance="@style/Holo.TextAppearance.Medium.Light"
|
||||
android:textColor="@color/text_search_item_greyed"
|
||||
android:textSize="12sp"/>
|
||||
|
@ -65,7 +71,7 @@
|
|||
android:fontFamily="@string/robotoRegular"
|
||||
android:textAppearance="@style/Holo.TextAppearance.Medium.Light"
|
||||
android:textColor="@color/text_search_item"
|
||||
android:textSize="16sp"/>
|
||||
android:textSize="13sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:animationCache="false"
|
||||
android:background="@color/bg_bottom_toolbar"
|
||||
android:divider="@drawable/separator_medium_padded"
|
||||
android:divider="@color/divider_search"
|
||||
android:dividerHeight="1px"
|
||||
android:scrollbarStyle="outsideOverlay"
|
||||
android:scrollingCache="false"/>
|
||||
|
|
|
@ -45,9 +45,10 @@
|
|||
<color name="green">#0F0</color>
|
||||
<color name="blue">#00F</color>
|
||||
|
||||
<color name="bg_menu">#e6414451</color>
|
||||
<color name="bg_bottom_toolbar">#414651</color>
|
||||
<color name="bg_menu">#e61D1F29</color>
|
||||
<color name="bg_bottom_toolbar">#1D1F29</color>
|
||||
<color name="bg_bottom_toolbar_pressed">#15d081</color>
|
||||
<color name="divider_standart">#4A4B53</color>
|
||||
|
||||
<!-- search -->
|
||||
<color name="bg_searchbox">#15c783</color>
|
||||
|
@ -55,11 +56,13 @@
|
|||
<color name="text_search_item_greyed">@android:color/darker_gray</color>
|
||||
<color name="bg_search_green">#1F9F7E</color>
|
||||
<color name="bg_search_green_pressed">#68BEA8</color>
|
||||
<color name="divider_search">#4A4B53</color>
|
||||
|
||||
<!-- place page -->
|
||||
<color name="text_info_box">@android:color/black</color>
|
||||
<color name="text_info_box_subtitle">#4C4C4C</color>
|
||||
<color name="text_info_box_share">#179E4D</color>
|
||||
<color name="bg_top_panels">#f2ffffff</color>
|
||||
<color name="bg_top_panels">#ffffffff</color>
|
||||
<color name="bg_azimut_arrow">#1D414651</color>
|
||||
<color name="fg_azimut_arrow">@android:color/white</color>
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@
|
|||
<item name="android:colorBackgroundCacheHint">@null</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowAnimationStyle">@android:style/Animation</item>
|
||||
<item name="android:divider">@drawable/separator_medium_padded</item>
|
||||
</style>
|
||||
|
||||
<!-- Dialog Holo.Light theme for Activity -->
|
||||
|
@ -97,12 +96,15 @@
|
|||
<item name="listPreferredItemPaddingRight">16dip</item>
|
||||
</style>
|
||||
|
||||
<style name="drawerSeparator">
|
||||
<style name="drawerSeparatorNoPadding">
|
||||
<item name="android:layout_height">1px</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:background">@android:color/black</item>
|
||||
</style>
|
||||
|
||||
<style name="drawerSeparator" parent="drawerSeparatorNoPadding">
|
||||
<item name="android:layout_marginRight">@dimen/dp_x_2</item>
|
||||
<item name="android:layout_marginLeft">@dimen/dp_x_2</item>
|
||||
<item name="android:background">@android:color/black</item>
|
||||
</style>
|
||||
|
||||
<style name="drawerSeparatorMediumPadded" parent="drawerSeparator">
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.mapswithme.maps.widget;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
|
@ -84,8 +83,8 @@ public class MapInfoView extends LinearLayout implements View.OnClickListener
|
|||
private final View mArrow;
|
||||
// Place page
|
||||
private RelativeLayout mGeoLayout;
|
||||
private TextView mTvCoords;
|
||||
private View mDistanceView;
|
||||
private TextView mTvLat;
|
||||
private TextView mTvLon;
|
||||
private ArrowView mAvDirection;
|
||||
private TextView mDistanceText;
|
||||
private ImageView mColorImage;
|
||||
|
@ -104,6 +103,46 @@ public class MapInfoView extends LinearLayout implements View.OnClickListener
|
|||
private boolean mIsLatLonDms;
|
||||
private static final String PREF_USE_DMS = "use_dms";
|
||||
|
||||
private OnLongClickListener mLatLonLongClickListener = new OnLongClickListener()
|
||||
{
|
||||
@Override
|
||||
public boolean onLongClick(View v)
|
||||
{
|
||||
final PopupMenu popup = new PopupMenu(getContext(), v);
|
||||
final Menu menu = popup.getMenu();
|
||||
final double lat = mMapObject.getLat();
|
||||
final double lon = mMapObject.getLon();
|
||||
|
||||
final String copyText = getResources().getString(android.R.string.copy);
|
||||
final String arrCoord[] = {
|
||||
Framework.nativeFormatLatLon(lat, lon, false),
|
||||
Framework.nativeFormatLatLon(lat, lon, true)};
|
||||
|
||||
menu.add(Menu.NONE, 0, 0, String.format("%s %s", copyText, arrCoord[0]));
|
||||
menu.add(Menu.NONE, 1, 1, String.format("%s %s", copyText, arrCoord[1]));
|
||||
menu.add(Menu.NONE, 2, 2, android.R.string.cancel);
|
||||
|
||||
popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener()
|
||||
{
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item)
|
||||
{
|
||||
final int id = item.getItemId();
|
||||
if (id >= 0 && id < 2)
|
||||
{
|
||||
final Context ctx = getContext();
|
||||
Utils.copyTextToClipboard(ctx, arrCoord[id]);
|
||||
Utils.toastShortcut(ctx, ctx.getString(R.string.copied_to_clipboard, arrCoord[id]));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
popup.show();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
public MapInfoView(Context context, AttributeSet attrs, int defStyleAttr)
|
||||
{
|
||||
super(context, attrs);
|
||||
|
@ -448,13 +487,14 @@ public class MapInfoView extends LinearLayout implements View.OnClickListener
|
|||
private void setUpGeoInformation()
|
||||
{
|
||||
mGeoLayout = (RelativeLayout) mPlacePageContainer.findViewById(R.id.info_box_geo_ref);
|
||||
mDistanceView = mGeoLayout.findViewById(R.id.info_box_geo_container_dist);
|
||||
mDistanceText = (TextView) mGeoLayout.findViewById(R.id.info_box_geo_distance);
|
||||
mAvDirection = (ArrowView) mGeoLayout.findViewById(R.id.av_direction);
|
||||
mAvDirection.setDrawCircle(true);
|
||||
mAvDirection.setVisibility(View.GONE); // should be hidden until first compass update
|
||||
mTvCoords = (TextView) mGeoLayout.findViewById(R.id.info_box_geo_location);
|
||||
mTvCoords.setOnClickListener(this);
|
||||
mTvLat = (TextView) mGeoLayout.findViewById(R.id.info_box_lat);
|
||||
mTvLat.setOnClickListener(this);
|
||||
mTvLon = (TextView) mGeoLayout.findViewById(R.id.info_box_lon);
|
||||
mTvLon.setOnClickListener(this);
|
||||
|
||||
final Location lastKnown = MWMApplication.get().getLocationService().getLastKnown();
|
||||
updateDistanceAndAzimut(lastKnown);
|
||||
|
@ -463,46 +503,8 @@ public class MapInfoView extends LinearLayout implements View.OnClickListener
|
|||
// Context menu for the coordinates copying.
|
||||
if (Utils.apiEqualOrGreaterThan(Build.VERSION_CODES.HONEYCOMB))
|
||||
{
|
||||
mTvCoords.setOnLongClickListener(new OnLongClickListener()
|
||||
{
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
public boolean onLongClick(View v)
|
||||
{
|
||||
final PopupMenu popup = new PopupMenu(getContext(), v);
|
||||
final Menu menu = popup.getMenu();
|
||||
final double lat = mMapObject.getLat();
|
||||
final double lon = mMapObject.getLon();
|
||||
|
||||
final String copyText = getResources().getString(android.R.string.copy);
|
||||
final String arrCoord[] = {
|
||||
Framework.nativeFormatLatLon(lat, lon, false),
|
||||
Framework.nativeFormatLatLon(lat, lon, true)};
|
||||
|
||||
menu.add(Menu.NONE, 0, 0, String.format("%s %s", copyText, arrCoord[0]));
|
||||
menu.add(Menu.NONE, 1, 1, String.format("%s %s", copyText, arrCoord[1]));
|
||||
menu.add(Menu.NONE, 2, 2, android.R.string.cancel);
|
||||
|
||||
popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener()
|
||||
{
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item)
|
||||
{
|
||||
final int id = item.getItemId();
|
||||
if (id >= 0 && id < 2)
|
||||
{
|
||||
final Context ctx = getContext();
|
||||
Utils.copyTextToClipboard(ctx, arrCoord[id]);
|
||||
Utils.toastShortcut(ctx, ctx.getString(R.string.copied_to_clipboard, arrCoord[id]));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
popup.show();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
mTvLat.setOnLongClickListener(mLatLonLongClickListener);
|
||||
mTvLon.setOnLongClickListener(mLatLonLongClickListener);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -528,10 +530,15 @@ public class MapInfoView extends LinearLayout implements View.OnClickListener
|
|||
append(Framework.nativeFormatSpeed(l.getSpeed()));
|
||||
mSubtitle.setText(builder.toString());
|
||||
|
||||
mDistanceView.setVisibility(View.GONE);
|
||||
mAvDirection.setVisibility(View.GONE);
|
||||
mDistanceText.setVisibility(View.GONE);
|
||||
}
|
||||
else
|
||||
mDistanceView.setVisibility(l != null ? View.VISIBLE : View.GONE);
|
||||
{
|
||||
final int visibility = l != null ? View.VISIBLE : View.GONE;
|
||||
mAvDirection.setVisibility(visibility);
|
||||
mDistanceText.setVisibility(visibility);
|
||||
}
|
||||
|
||||
|
||||
if (l != null)
|
||||
|
@ -547,7 +554,12 @@ public class MapInfoView extends LinearLayout implements View.OnClickListener
|
|||
{
|
||||
final double lat = mMapObject.getLat();
|
||||
final double lon = mMapObject.getLon();
|
||||
mTvCoords.setText(Framework.nativeFormatLatLon(lat, lon, mIsLatLonDms));
|
||||
final String[] latLon = Framework.nativeFormatLatLon(lat, lon, mIsLatLonDms).split(" ");
|
||||
if (latLon.length == 2)
|
||||
{
|
||||
mTvLat.setText(latLon[0]);
|
||||
mTvLon.setText(latLon[1]);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateAzimuth(double northAzimuth)
|
||||
|
@ -826,7 +838,8 @@ public class MapInfoView extends LinearLayout implements View.OnClickListener
|
|||
case R.id.btn_route_to:
|
||||
Framework.nativeSetRouteEnd(mMapObject.getLat(), mMapObject.getLon());
|
||||
break;
|
||||
case R.id.info_box_geo_location:
|
||||
case R.id.info_box_lat:
|
||||
case R.id.info_box_lon:
|
||||
mIsLatLonDms = !mIsLatLonDms;
|
||||
getContext().getSharedPreferences(getContext().getString(R.string.pref_file_name),
|
||||
Context.MODE_PRIVATE).edit().putBoolean(PREF_USE_DMS, mIsLatLonDms).commit();
|
||||
|
|
Loading…
Add table
Reference in a new issue