Update icons

This commit is contained in:
Victor Shcherb 2013-04-14 21:15:45 +02:00
parent 097feb98a2
commit 7d34f11e17
22 changed files with 45 additions and 36 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/poi_parking_pos_limit_menu_pushed" android:state_pressed="true"/>
<item android:drawable="@drawable/poi_parking_pos_limit_menu"/>
</selector>

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/poi_parking_pos_no_limit_menu_pushed" android:state_pressed="true"/>
<item android:drawable="@drawable/poi_parking_pos_no_limit_menu"/>
</selector>

View file

@ -8,12 +8,12 @@
android:layout_marginLeft="5dp" android:layout_marginRight="5dp" 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> 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"> <LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:gravity="center" android:layout_height="wrap_content" android:orientation="horizontal">
<Button android:contentDescription="@string/app_mode_car" android:id="@+id/CarButton" <ImageButton android:contentDescription="@string/app_mode_car" android:id="@+id/CarButton"
android:layout_width="64dp" android:layout_height="64dp" android:layout_marginLeft="10dp" android:button="@drawable/car" /> android:layout_width="64dp" android:layout_height="64dp" android:layout_marginLeft="10dp" android:src="@drawable/car_small" />
<Button android:contentDescription="@string/app_mode_bicycle" android:id="@+id/BicycleButton" <ImageButton android:contentDescription="@string/app_mode_bicycle" android:id="@+id/BicycleButton"
android:layout_width="64dp" android:layout_height="64dp" android:layout_marginLeft="10dp" android:button="@drawable/bicycle" /> android:layout_width="64dp" android:layout_height="64dp" android:layout_marginLeft="10dp" android:src="@drawable/bicycle_small" />
<Button android:contentDescription="@string/app_mode_pedestrian" android:id="@+id/PedestrianButton" <ImageButton android:contentDescription="@string/app_mode_pedestrian" 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_marginLeft="10dp" android:src="@drawable/pedestrian_small" />
</LinearLayout> </LinearLayout>

View file

@ -4,15 +4,24 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" > android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="5dp"
>
<CheckBox android:id="@+id/check_item" android:focusable="false" android:gravity="top"
android:layout_width="48dp"
android:layout_height="48dp"/>
</LinearLayout>
<TextView <TextView
android:id="@+id/plugin_name" android:id="@+id/plugin_name"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="fill_parent"
android:drawablePadding="10dp"
android:textStyle="bold" android:textStyle="bold"
android:textSize="20sp" android:drawableRight="@drawable/marker1_disabled" android:drawableLeft="@drawable/list_activities_plugin_menu_symbol" android:text="@string/extra_settings" android:gravity="center_vertical" android:paddingLeft="10dp" android:paddingRight="10dp" android:background="@drawable/ic_background_plugin_listitem"> android:textSize="20sp" android:text="@string/extra_settings"
android:gravity="center_vertical" android:paddingLeft="5dp" android:paddingRight="10dp">
</TextView> </TextView>
</LinearLayout>
<TextView <TextView
android:id="@+id/plugin_descr" android:id="@+id/plugin_descr"
android:layout_width="fill_parent" android:layout_width="fill_parent"

View file

@ -13,6 +13,7 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
@ -23,7 +24,6 @@ public class PluginsActivity extends OsmandListActivity {
private List<OsmandPlugin> availablePlugins; private List<OsmandPlugin> availablePlugins;
private Set<String> clickedPlugins = new LinkedHashSet<String>(); private Set<String> clickedPlugins = new LinkedHashSet<String>();
private Set<String> restartPlugins = new LinkedHashSet<String>(); private Set<String> restartPlugins = new LinkedHashSet<String>();
private static int colorGreen = 0xff23CC6C;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
@ -41,10 +41,15 @@ public class PluginsActivity extends OsmandListActivity {
setListAdapter(new OsmandPluginsAdapter(availablePlugins)); setListAdapter(new OsmandPluginsAdapter(availablePlugins));
} }
@Override @Override
protected void onListItemClick(ListView l, View v, int position, long id) { protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id); super.onListItemClick(l, v, position, id);
click(position);
}
private void click(int position) {
OsmandPlugin item = getListAdapter().getItem(position); OsmandPlugin item = getListAdapter().getItem(position);
boolean enable = !restartPlugins.contains(item.getId()); boolean enable = !restartPlugins.contains(item.getId());
boolean ok = OsmandPlugin.enablePlugin(((OsmandApplication) getApplication()), item, enable); boolean ok = OsmandPlugin.enablePlugin(((OsmandApplication) getApplication()), item, enable);
@ -80,18 +85,27 @@ public class PluginsActivity extends OsmandListActivity {
} }
OsmandPlugin plugin = getItem(position); OsmandPlugin plugin = getItem(position);
boolean toBeEnabled = restartPlugins.contains(plugin.getId()); boolean toBeEnabled = restartPlugins.contains(plugin.getId());
int resourceId = toBeEnabled ? R.drawable.marker1_enabled : R.drawable.marker1_disabled;
final View row = v; final View row = v;
CheckBox ch = (CheckBox) row.findViewById(R.id.check_item);
ch.setOnClickListener(null);
ch.setChecked(toBeEnabled);
ch.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
click(position);
}
});
TextView nameView = (TextView) row.findViewById(R.id.plugin_name); TextView nameView = (TextView) row.findViewById(R.id.plugin_name);
nameView.setText(plugin.getName()); nameView.setText(plugin.getName());
nameView.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(R.drawable.list_activities_plugin_menu_symbol), null, getResources().getDrawable(resourceId), null);
nameView.setContentDescription(plugin.getName() + " " + getString(toBeEnabled ? R.string.item_checked : R.string.item_unchecked)); nameView.setContentDescription(plugin.getName() + " " + getString(toBeEnabled ? R.string.item_checked : R.string.item_unchecked));
TextView description = (TextView) row.findViewById(R.id.plugin_descr); TextView description = (TextView) row.findViewById(R.id.plugin_descr);
description.setText(plugin.getDescription()); description.setText(plugin.getDescription());
description.setVisibility(clickedPlugins.contains(plugin.getId()) || !restartPlugins.contains(plugin.getId()) ? View.VISIBLE : View.GONE); description.setVisibility(clickedPlugins.contains(plugin.getId()) ||
description.setTextColor(toBeEnabled? colorGreen : Color.LTGRAY); !restartPlugins.contains(plugin.getId()) ? View.VISIBLE : View.GONE);
description.setTextColor(Color.LTGRAY);
return row; return row;
} }

View file

@ -679,16 +679,16 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
builder.setView(view); builder.setView(view);
final AlertDialog dlg = builder.show(); final AlertDialog dlg = builder.show();
final Button[] buttons = new Button[ApplicationMode.values().length]; final View[] buttons = new View[ApplicationMode.values().length];
buttons[ApplicationMode.CAR.ordinal()] = (Button) view.findViewById(R.id.CarButton); buttons[ApplicationMode.CAR.ordinal()] = view.findViewById(R.id.CarButton);
buttons[ApplicationMode.BICYCLE.ordinal()] = (Button) view.findViewById(R.id.BicycleButton); buttons[ApplicationMode.BICYCLE.ordinal()] =view.findViewById(R.id.BicycleButton);
buttons[ApplicationMode.PEDESTRIAN.ordinal()] = (Button) view.findViewById(R.id.PedestrianButton); buttons[ApplicationMode.PEDESTRIAN.ordinal()] = view.findViewById(R.id.PedestrianButton);
final Dialog scrDialog = scr.getDialog(); final Dialog scrDialog = scr.getDialog();
final String tlt = " " + title; final String tlt = " " + title;
for (int i = 0; i < buttons.length; i++) { for (int i = 0; i < buttons.length; i++) {
if (buttons[i] != null) { if (buttons[i] != null) {
final int ind = i; final int ind = i;
final Button b = buttons[i]; final View b = buttons[i];
b.setOnClickListener(new View.OnClickListener() { b.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {

View file

@ -512,7 +512,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
} }
}); });
parkingPlaceControl.setText(null, null); parkingPlaceControl.setText(null, null);
parkingPlaceControl.setImageDrawable(map.getResources().getDrawable(R.drawable.list_activities_poi_parking)); parkingPlaceControl.setImageDrawable(map.getResources().getDrawable(R.drawable.widget_parking));
return parkingPlaceControl; return parkingPlaceControl;
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB