New icons

This commit is contained in:
Victor Shcherb 2013-05-18 02:06:27 +02:00
parent a47d81ada7
commit dad70ecb59
16 changed files with 18 additions and 36 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -7,11 +7,12 @@
<!-- <TextView android:layout_width="fill_parent" android:textSize="18dp" android:layout_height="wrap_content" android:gravity="center" android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android:text="@string/recalculate_route_to_your_location"></TextView> --> <!-- <TextView android:layout_width="fill_parent" android:textSize="18dp" android:layout_height="wrap_content" android:gravity="center" android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android:text="@string/recalculate_route_to_your_location"></TextView> -->
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:gravity="center" android:layout_height="wrap_content" android:orientation="horizontal"> <LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:gravity="center" android:layout_height="wrap_content" android:orientation="horizontal">
<ToggleButton android:contentDescription="@string/app_mode_car" android:textOn="" android:textOff="" android:id="@+id/CarButton" <ToggleButton android:contentDescription="@string/app_mode_car" android:textOn="" android:textOff="" android:id="@+id/CarButton"
android:layout_width="64dp" android:layout_height="64dp" android:layout_marginLeft="10dp" android:button="@drawable/car" /> android:layout_gravity="center" android:layout_width="64dp" android:layout_height="64dp" android:layout_marginLeft="10dp" />
<ToggleButton android:contentDescription="@string/app_mode_bicycle" android:textOn="" android:textOff="" android:id="@+id/BicycleButton" <ToggleButton android:contentDescription="@string/app_mode_bicycle" android:textOn="" android:textOff="" android:id="@+id/BicycleButton"
android:layout_width="64dp" android:layout_height="64dp" android:layout_marginLeft="10dp" android:button="@drawable/bicycle"/> android:layout_gravity="center" android:layout_width="64dp" android:layout_height="64dp" android:layout_marginLeft="10dp" />
<ToggleButton android:contentDescription="@string/app_mode_pedestrian" android:textOn="" android:textOff="" android:id="@+id/PedestrianButton" <ToggleButton android:contentDescription="@string/app_mode_pedestrian" android:textOn="" android:textOff="" android:id="@+id/PedestrianButton"
android:layout_width="64dp" android:layout_height="64dp" android:layout_marginLeft="10dp" android:button="@drawable/pedestrian"/> android:layout_width="64dp" android:layout_height="64dp"
android:layout_gravity="center" android:layout_marginLeft="10dp" />
</LinearLayout> </LinearLayout>
<ScrollView android:layout_height="wrap_content" android:layout_width="fill_parent" <ScrollView android:layout_height="wrap_content" android:layout_width="fill_parent"

View file

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical" >
<TextView android:id="@+id/TextView" android:layout_width="fill_parent" android:textSize="18dp" android:layout_height="wrap_content"
android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
android:gravity="center" android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android:text="@string/select_navigation_mode"></TextView>
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:gravity="center" android:layout_height="wrap_content" android:orientation="horizontal">
<ImageButton android:contentDescription="@string/app_mode_car" android:id="@+id/CarButton"
android:layout_width="64dp" android:layout_height="64dp" android:layout_marginLeft="10dp" android:src="@drawable/car_small" />
<ImageButton android:contentDescription="@string/app_mode_bicycle" android:id="@+id/BicycleButton"
android:layout_width="64dp" android:layout_height="64dp" android:layout_marginLeft="10dp" android:src="@drawable/bicycle_small" />
<ImageButton android:contentDescription="@string/app_mode_pedestrian" android:id="@+id/PedestrianButton"
android:layout_width="64dp" android:layout_height="64dp" android:layout_marginLeft="10dp" android:src="@drawable/pedestrian_small" />
</LinearLayout>
</LinearLayout>

View file

@ -516,11 +516,15 @@ public class MapActivityActions implements DialogProvider {
final TargetPointsHelper targets = getTargets(); final TargetPointsHelper targets = getTargets();
View view = mapActivity.getLayoutInflater().inflate(R.layout.calculate_route, null); View view = mapActivity.getLayoutInflater().inflate(R.layout.calculate_route, null);
boolean lc = mapActivity.getMyApplication().getSettings().isLightContent();
final CheckBox nonoptimal = (CheckBox) view.findViewById(R.id.OptimalCheckox); final CheckBox nonoptimal = (CheckBox) view.findViewById(R.id.OptimalCheckox);
final ToggleButton[] buttons = new ToggleButton[ApplicationMode.values().length]; final ToggleButton[] buttons = new ToggleButton[ApplicationMode.values().length];
buttons[ApplicationMode.CAR.ordinal()] = (ToggleButton) view.findViewById(R.id.CarButton); buttons[ApplicationMode.CAR.ordinal()] = (ToggleButton) view.findViewById(R.id.CarButton);
buttons[ApplicationMode.CAR.ordinal()].setButtonDrawable(lc ? R.drawable.car_dark : R.drawable.car_light );
buttons[ApplicationMode.BICYCLE.ordinal()] = (ToggleButton) view.findViewById(R.id.BicycleButton); buttons[ApplicationMode.BICYCLE.ordinal()] = (ToggleButton) view.findViewById(R.id.BicycleButton);
buttons[ApplicationMode.BICYCLE.ordinal()].setButtonDrawable(lc ? R.drawable.bicycle_dark : R.drawable.bicycle_light );
buttons[ApplicationMode.PEDESTRIAN.ordinal()] = (ToggleButton) view.findViewById(R.id.PedestrianButton); buttons[ApplicationMode.PEDESTRIAN.ordinal()] = (ToggleButton) view.findViewById(R.id.PedestrianButton);
buttons[ApplicationMode.PEDESTRIAN.ordinal()].setButtonDrawable(lc ? R.drawable.pedestrian_dark : R.drawable.pedestrian_light );
TextView tv = ((TextView) view.findViewById(R.id.TextView)); TextView tv = ((TextView) view.findViewById(R.id.TextView));
tv.setText(generateRouteDescription(fromOrCurrent, to)); tv.setText(generateRouteDescription(fromOrCurrent, to));

View file

@ -17,10 +17,9 @@ import android.util.DisplayMetrics;
import android.view.Gravity; import android.view.Gravity;
import android.view.View; import android.view.View;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.Button;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.FrameLayout.LayoutParams; import android.widget.FrameLayout.LayoutParams;
import android.widget.ImageButton;
import android.widget.LinearLayout; import android.widget.LinearLayout;
@ -28,9 +27,9 @@ public class RouteInfoLayer extends OsmandMapLayer implements IRouteInformationL
private OsmandMapTileView view; private OsmandMapTileView view;
private final RoutingHelper routingHelper; private final RoutingHelper routingHelper;
private Button next; private View next;
private Button prev; private View prev;
private Button info; private View info;
private int directionInfo = -1; private int directionInfo = -1;
private DisplayMetrics dm; private DisplayMetrics dm;
@ -58,20 +57,19 @@ public class RouteInfoLayer extends OsmandMapLayer implements IRouteInformationL
DisplayMetrics dm = activity.getResources().getDisplayMetrics(); DisplayMetrics dm = activity.getResources().getDisplayMetrics();
ll.setPadding(0, 0, (int) (dm.density * 15), (int) (dm.density * 50)); ll.setPadding(0, 0, (int) (dm.density * 15), (int) (dm.density * 50));
fl.addView(ll, new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, Gravity.BOTTOM | Gravity.CENTER)); fl.addView(ll, new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, Gravity.BOTTOM | Gravity.CENTER));
prev = new Button(activity); prev = new ImageButton(activity);
prev.setContentDescription(activity.getString(R.string.previous_button)); prev.setContentDescription(activity.getString(R.string.previous_button));
prev.setCompoundDrawables(activity.getResources().getDrawable(R.drawable.a_1_navigation_previous_item_light), null, null, null); prev.setBackground(activity.getResources().getDrawable(R.drawable.ax_1_navigation_previous_item_light));
ll.addView(prev); ll.addView(prev);
info = new Button(activity); info = new ImageButton(activity);
info.setContentDescription(activity.getString(R.string.info_button)); info.setContentDescription(activity.getString(R.string.info_button));
info.setPadding((int) (dm.density * 8), 0, 0, 0); info.setPadding((int) (dm.density * 8), 0, 0, 0);
info.setCompoundDrawables(activity.getResources().getDrawable(R.drawable.a_2_action_about_light), null, null, null); info.setBackground(activity.getResources().getDrawable(R.drawable.ax_2_action_about_light));
ll.addView(info); ll.addView(info);
next = new Button(activity); next = new ImageButton(activity);
next.setContentDescription(activity.getString(R.string.next_button)); next.setContentDescription(activity.getString(R.string.next_button));
next.setPadding((int) (dm.density * 8), 0, 0, 0); next.setPadding((int) (dm.density * 8), 0, 0, 0);
next.setBackground(activity.getResources().getDrawable(R.drawable.a_1_navigation_next_item_light)); next.setBackground(activity.getResources().getDrawable(R.drawable.ax_1_navigation_next_item_light));
next.setCompoundDrawables(activity.getResources().getDrawable(R.drawable.a_1_navigation_next_item_light), null, null, null);
ll.addView(next); ll.addView(next);
} }