Set the color and size of the text; rename string "to"; fix night mode check

This commit is contained in:
Alexander Sytnyk 2017-06-16 11:50:45 +03:00
parent 4927ad0d34
commit e509e23c20
7 changed files with 23 additions and 13 deletions

View file

@ -22,6 +22,8 @@
android:layout_marginRight="12dp"
android:layout_weight="1"
android:text="@string/mapillary_menu_date_from"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
tools:text="From" />
<android.support.v7.widget.AppCompatTextView
@ -31,7 +33,9 @@
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:text="@string/mapillary_menu_date_to"
android:text="@string/shared_string_to"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
tools:text="To" />
</LinearLayout>
@ -47,7 +51,9 @@
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_marginRight="12dp"
android:layout_weight="1" />
android:layout_weight="1"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size" />
<android.support.v7.widget.AppCompatSpinner
android:id="@+id/from_spinner"
@ -55,7 +61,9 @@
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:layout_weight="1" />
android:layout_weight="1"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size" />
</LinearLayout>
<View

View file

@ -14,6 +14,7 @@
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:hint="@string/mapillary_menu_edit_text_hint"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size" />
<View

View file

@ -42,6 +42,7 @@
android:layout_height="match_parent"
android:ellipsize="end"
android:lines="1"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
tools:text="View images added by a certain user." />
</LinearLayout>

View file

@ -9,7 +9,7 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
<string name="mapillary_menu_date_to">To</string>
<string name="shared_string_to">To</string>
<string name="mapillary_menu_date_from">From</string>
<string name="mapillary_menu_descr_dates">View images added in a certain period.</string>
<string name="mapillary_menu_title_dates">Dates</string>

View file

@ -42,15 +42,15 @@ public class MapillaryMenu {
}
};
boolean light = settings.isLightContent();
boolean nightMode = mapActivity.getMyApplication().getDaynightHelper().isNightModeForMapControls();
int toggleIconColorId;
int toggleIconId;
if (selected) {
toggleIconId = R.drawable.ic_action_view;
toggleIconColorId = light ? R.color.color_dialog_buttons_light : R.color.color_dialog_buttons_dark;
toggleIconColorId = nightMode ? R.color.color_dialog_buttons_light : R.color.color_dialog_buttons_dark;
} else {
toggleIconId = R.drawable.ic_action_hide;
toggleIconColorId = light ? R.color.icon_color : 0;
toggleIconColorId = nightMode ? R.color.icon_color : 0;
}
contextMenuAdapter.addItem(new ContextMenuItem.ItemBuilder()

View file

@ -168,16 +168,16 @@ public class ContourLinesMenu {
}
};
boolean light = settings.isLightContent();
boolean nightMode = mapActivity.getMyApplication().getDaynightHelper().isNightModeForMapControls();
int toggleIconColorId;
int toggleIconId;
if (selected) {
toggleIconId = R.drawable.ic_action_view;
toggleIconColorId = light ?
toggleIconColorId = nightMode ?
R.color.color_dialog_buttons_light : R.color.color_dialog_buttons_dark;
} else {
toggleIconId = R.drawable.ic_action_hide;
toggleIconColorId = light ? R.color.icon_color : 0;
toggleIconColorId = nightMode ? R.color.icon_color : 0;
}
contextMenuAdapter.addItem(new ContextMenuItem.ItemBuilder()
.setTitleId(toggleActionStringId, mapActivity)

View file

@ -76,16 +76,16 @@ public class HillshadeMenu {
}
};
boolean light = settings.isLightContent();
boolean nightMode = mapActivity.getMyApplication().getDaynightHelper().isNightModeForMapControls();
int toggleIconColorId;
int toggleIconId;
if (selected) {
toggleIconId = R.drawable.ic_action_view;
toggleIconColorId = light ?
toggleIconColorId = nightMode ?
R.color.color_dialog_buttons_light : R.color.color_dialog_buttons_dark;
} else {
toggleIconId = R.drawable.ic_action_hide;
toggleIconColorId = light ? R.color.icon_color : 0;
toggleIconColorId = nightMode ? R.color.icon_color : 0;
}
contextMenuAdapter.addItem(new ContextMenuItem.ItemBuilder()
.setTitleId(toggleActionStringId, mapActivity)