Small fixes

This commit is contained in:
Victor Shcherb 2015-03-19 01:52:33 +01:00
parent 4f4ce9eb48
commit 4485c92b58
3 changed files with 29 additions and 28 deletions

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -17,10 +16,12 @@
android:layout_width="wrap_content"
android:text="@string/search_for" />
<Button
<net.osmand.plus.widgets.ButtonEx
android:id="@+id/recents"
style="?attr/dashboardGeneralButtonStyle"
android:text="@string/shared_string_history" />
android:text="@string/shared_string_history"
osmand:textAllCapsCompat="true"
osmand:typeface="@string/font_roboto_medium" />
</LinearLayout>
<View

View file

@ -139,8 +139,8 @@ public class DashWaypointsFragment extends DashLocationFragment {
DirectionsDialogs.setupPopUpMenuIcon(optionsMenu);
MenuItem
item = optionsMenu.getMenu().add(
R.string.shared_string_add_to_favorites).setIcon(light ?
R.drawable.ic_action_fav_light : R.drawable.ic_action_fav_dark);
R.string.shared_string_add_to_favorites).setIcon(getMyApplication().getIconsCache().
getContentIcon(R.drawable.ic_action_fav_dark));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
@ -158,7 +158,8 @@ public class DashWaypointsFragment extends DashLocationFragment {
if (model.index > 0 || target) {
final int ind = target ? allTargets.size() - 1 : model.index;
item = optionsMenu.getMenu().add(R.string.waypoint_visit_before)
.setIcon(light ? R.drawable.ic_action_up_light : R.drawable.ic_action_up_dark);
.setIcon(getMyApplication().getIconsCache().
getContentIcon(R.drawable.ic_action_up_dark));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
@ -172,7 +173,8 @@ public class DashWaypointsFragment extends DashLocationFragment {
}
if (!target) {
item = optionsMenu.getMenu().add(R.string.waypoint_visit_after)
.setIcon(light ? R.drawable.ic_action_down_light : R.drawable.ic_action_down_dark);
.setIcon(getMyApplication().getIconsCache().
getContentIcon(R.drawable.ic_action_down_dark));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
@ -186,8 +188,8 @@ public class DashWaypointsFragment extends DashLocationFragment {
}
}
item = optionsMenu.getMenu().add(
R.string.shared_string_delete).setIcon(light ?
R.drawable.ic_action_gdiscard_light: R.drawable.ic_action_gdiscard_dark);
R.string.shared_string_delete).setIcon(getMyApplication().getIconsCache().
getContentIcon(R.drawable.ic_action_delete_dark));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {

View file

@ -29,8 +29,9 @@ public class DashSimulateFragment extends DashBaseFragment {
boolean routeAnimating = loc.getLocationSimulation().isRouteAnimating();
((TextView) getView().findViewById(R.id.name)).setText(routeAnimating ? R.string.animate_route_off
: R.string.animate_route);
((ImageButton) getView().findViewById(R.id.stop)).setImageDrawable(getActivity().getResources().getDrawable(
!routeAnimating ? R.drawable.ic_action_play_dark : R.drawable.ic_action_rec_stop));
((ImageButton) getView().findViewById(R.id.stop)).setImageDrawable(
!routeAnimating ? getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_play_dark)
: getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_rec_stop));
}
@ -62,7 +63,4 @@ public class DashSimulateFragment extends DashBaseFragment {
return view;
}
}