Alexey Kulish 2016-03-06 21:44:39 +03:00
parent 8a3ad23e4c
commit c471e2e81d
3 changed files with 22 additions and 23 deletions

View file

@ -286,13 +286,13 @@
<TextView
android:id="@+id/waypoint_dist"
android:layout_width="60dp"
android:layout_width="64dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dp"
android:layout_marginLeft="2dp"
android:maxLines="2"
android:textColor="@color/wpt_distance_color"
android:textSize="@dimen/default_desc_text_size"
android:textColor="@color/osmand_orange"
android:textSize="@dimen/default_list_text_size"
android:textStyle="bold"/>
<FrameLayout

View file

@ -75,25 +75,25 @@
<TextView
android:id="@+id/waypoint_dist"
android:layout_width="60dp"
android:layout_width="64dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dp"
android:layout_marginLeft="2dp"
android:maxLines="2"
android:textColor="@color/wpt_distance_color"
android:textSize="@dimen/default_desc_text_size"
android:textColor="@color/osmand_orange"
android:textSize="@dimen/default_list_text_size"
android:textStyle="bold"/>
<TextView
android:id="@+id/waypoint_deviation"
android:layout_width="60dp"
android:layout_width="64dp"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginLeft="4dp"
android:layout_marginLeft="2dp"
android:drawablePadding="2dp"
android:maxLines="1"
android:textColor="@color/wpt_distance_color"
android:textSize="@dimen/default_sub_text_size"
android:textColor="@color/osmand_orange"
android:textSize="@dimen/default_list_text_size"
android:textStyle="bold"
android:visibility="gone"/>

View file

@ -130,19 +130,18 @@ public class WaypointDialogHelper {
if (dist > 0 && ps.deviationDistance > 0) {
String devStr = "+" + OsmAndFormatter.getFormattedDistance(ps.deviationDistance, app);
textDeviation.setText(devStr);
int colorId = R.color.wpt_distance_color;
if (!topBar) {
colorId = nightMode ? R.color.secondary_text_dark : R.color.secondary_text_light;
int colorId = nightMode ? R.color.secondary_text_dark : R.color.secondary_text_light;
AndroidUtils.setTextSecondaryColor(activity, textDeviation, nightMode);
}
if (ps.deviationDirectionRight) {
textDeviation.setCompoundDrawablesWithIntrinsicBounds(
app.getIconsCache().getIcon(R.drawable.ic_small_turn_right, colorId),
null, null, null);
} else {
textDeviation.setCompoundDrawablesWithIntrinsicBounds(
app.getIconsCache().getIcon(R.drawable.ic_small_turn_left, colorId),
null, null, null);
if (ps.deviationDirectionRight) {
textDeviation.setCompoundDrawablesWithIntrinsicBounds(
app.getIconsCache().getIcon(R.drawable.ic_small_turn_right, colorId),
null, null, null);
} else {
textDeviation.setCompoundDrawablesWithIntrinsicBounds(
app.getIconsCache().getIcon(R.drawable.ic_small_turn_left, colorId),
null, null, null);
}
}
textDeviation.setVisibility(View.VISIBLE);
} else {