From 4a86313d570d071f45c3a11de5a3c5ddd6d3318d Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 29 Jul 2012 14:02:20 +0200 Subject: [PATCH] Refactor expandable names --- ...pressed.png => expandable_category_empty.png} | Bin ...pushed.png => expandable_category_pushed.png} | Bin ...shed.png => expandable_category_unpushed.png} | Bin ...pressed.png => expandable_category_empty.png} | Bin ...pushed.png => expandable_category_pushed.png} | Bin ...shed.png => expandable_category_unpushed.png} | Bin .../list_activities_dot_marker1_pressed.png | Bin 3334 -> 0 bytes OsmAnd/res/drawable/indicator_custom_gray.xml | 11 ----------- .../layout/download_index_list_item_category.xml | 2 +- OsmAnd/res/layout/favourites_list_category.xml | 2 +- .../layout/local_index_list_item_category.xml | 2 +- .../local_openstreetmap_list_item_category.xml | 13 +++++++++++-- .../OsmandBaseExpandableListAdapter.java | 6 +++--- .../plus/osmedit/LocalOpenstreetmapActivity.java | 4 +++- 14 files changed, 20 insertions(+), 20 deletions(-) rename OsmAnd/res/drawable-hdpi/{list_activities_dot_marker1_unpressed.png => expandable_category_empty.png} (100%) rename OsmAnd/res/drawable-hdpi/{list_activities_background_pushed.png => expandable_category_pushed.png} (100%) rename OsmAnd/res/drawable-hdpi/{list_activities_background_unpushed.png => expandable_category_unpushed.png} (100%) rename OsmAnd/res/drawable-large/{list_activities_dot_marker1_unpressed.png => expandable_category_empty.png} (100%) rename OsmAnd/res/drawable-large/{list_activities_background_pushed.png => expandable_category_pushed.png} (100%) rename OsmAnd/res/drawable-large/{list_activities_background_unpushed.png => expandable_category_unpushed.png} (100%) delete mode 100644 OsmAnd/res/drawable-large/list_activities_dot_marker1_pressed.png delete mode 100644 OsmAnd/res/drawable/indicator_custom_gray.xml diff --git a/OsmAnd/res/drawable-hdpi/list_activities_dot_marker1_unpressed.png b/OsmAnd/res/drawable-hdpi/expandable_category_empty.png similarity index 100% rename from OsmAnd/res/drawable-hdpi/list_activities_dot_marker1_unpressed.png rename to OsmAnd/res/drawable-hdpi/expandable_category_empty.png diff --git a/OsmAnd/res/drawable-hdpi/list_activities_background_pushed.png b/OsmAnd/res/drawable-hdpi/expandable_category_pushed.png similarity index 100% rename from OsmAnd/res/drawable-hdpi/list_activities_background_pushed.png rename to OsmAnd/res/drawable-hdpi/expandable_category_pushed.png diff --git a/OsmAnd/res/drawable-hdpi/list_activities_background_unpushed.png b/OsmAnd/res/drawable-hdpi/expandable_category_unpushed.png similarity index 100% rename from OsmAnd/res/drawable-hdpi/list_activities_background_unpushed.png rename to OsmAnd/res/drawable-hdpi/expandable_category_unpushed.png diff --git a/OsmAnd/res/drawable-large/list_activities_dot_marker1_unpressed.png b/OsmAnd/res/drawable-large/expandable_category_empty.png similarity index 100% rename from OsmAnd/res/drawable-large/list_activities_dot_marker1_unpressed.png rename to OsmAnd/res/drawable-large/expandable_category_empty.png diff --git a/OsmAnd/res/drawable-large/list_activities_background_pushed.png b/OsmAnd/res/drawable-large/expandable_category_pushed.png similarity index 100% rename from OsmAnd/res/drawable-large/list_activities_background_pushed.png rename to OsmAnd/res/drawable-large/expandable_category_pushed.png diff --git a/OsmAnd/res/drawable-large/list_activities_background_unpushed.png b/OsmAnd/res/drawable-large/expandable_category_unpushed.png similarity index 100% rename from OsmAnd/res/drawable-large/list_activities_background_unpushed.png rename to OsmAnd/res/drawable-large/expandable_category_unpushed.png diff --git a/OsmAnd/res/drawable-large/list_activities_dot_marker1_pressed.png b/OsmAnd/res/drawable-large/list_activities_dot_marker1_pressed.png deleted file mode 100644 index 9105f295cf5d5069362f8d4943520f81672248f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3334 zcmV+h4f*nkP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%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KOyBu&POaL_iHzi5h;&~nbFdmOFnM{rVJOl6q zz}VLb=5bpT#mA;;s)k`e6vcmvgTY{@*X!+cI-Psd>2w#sksm-U5{W#tEDMB?g&Pz_ zfubmg#bW7JtM$I$?_UG(?)*No;Qp(oX+EHodWxS7Ns?gOwyf*=3jo$q0Aq{~hr@@- zWRm!C3LylP(y*$k`%3{l&tH$nLZKU; z0A1IwZ1Sl%j)P@cRZjpRB)sX*m1Q~Q2~bt_WK)2qX{Vk5S(ZDS0(4#f<_SopQuPhr zV3y5hUwHy@x!j?us)Ka_l+vG+(zl)fP18OU3WbmBh)a@m;yBJz#@O#=t>QG3$=uK9 z^I!dl^E^K-m&>0LiNvFoy$HbPVzIbaDwUdoAWT+?D~d9#R;%^x?d`javE%<8IL}?z z{gqCqYmG+Za=YEWG#m~C=iKtgw(TE|<9rcCagQ<9^feC{V{cs7tye0QTL7+hyIndO zjRXJ)27@C_)0zNY19-_88?7^Nz!>WSH~?_qx~>I4otKX1wbj - - - - - - - - - - \ No newline at end of file diff --git a/OsmAnd/res/layout/download_index_list_item_category.xml b/OsmAnd/res/layout/download_index_list_item_category.xml index bc1223169c..c889afbb1f 100644 --- a/OsmAnd/res/layout/download_index_list_item_category.xml +++ b/OsmAnd/res/layout/download_index_list_item_category.xml @@ -10,7 +10,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:paddingLeft="10dp" - android:src="@drawable/indicator_custom_gray" /> + android:src="@drawable/expandable_category_unpushed" /> - + android:src="@drawable/expandable_category_unpushed" /> + android:layout_height="wrap_content" + android:background="@drawable/tab_menu_item_small"> + + + android:textSize="21sp" android:layout_marginLeft="10dp"> diff --git a/OsmAnd/src/net/osmand/plus/activities/OsmandBaseExpandableListAdapter.java b/OsmAnd/src/net/osmand/plus/activities/OsmandBaseExpandableListAdapter.java index 6a25d6fdad..f07869b109 100644 --- a/OsmAnd/src/net/osmand/plus/activities/OsmandBaseExpandableListAdapter.java +++ b/OsmAnd/src/net/osmand/plus/activities/OsmandBaseExpandableListAdapter.java @@ -11,12 +11,12 @@ public abstract class OsmandBaseExpandableListAdapter extends BaseExpandableList ImageView indicator = (ImageView) row.findViewById(R.id.explist_indicator); if (!isExpanded) { if (getChildrenCount(groupPosition) == 0) { - indicator.setImageResource(R.drawable.list_activities_dot_marker1_unpressed); + indicator.setImageResource(R.drawable.expandable_category_empty); } else { - indicator.setImageResource(R.drawable.list_activities_background_unpushed); + indicator.setImageResource(R.drawable.expandable_category_unpushed); } } else { - indicator.setImageResource(R.drawable.list_activities_background_pushed); + indicator.setImageResource(R.drawable.expandable_category_pushed); } } diff --git a/OsmAnd/src/net/osmand/plus/osmedit/LocalOpenstreetmapActivity.java b/OsmAnd/src/net/osmand/plus/osmedit/LocalOpenstreetmapActivity.java index e70953b698..df60504555 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/LocalOpenstreetmapActivity.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/LocalOpenstreetmapActivity.java @@ -15,6 +15,7 @@ import net.osmand.plus.OsmandSettings; import net.osmand.plus.ProgressDialogImplementation; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.activities.OsmandBaseExpandableListAdapter; import net.osmand.plus.activities.OsmandExpandableListActivity; import android.app.Dialog; import android.app.ProgressDialog; @@ -273,7 +274,7 @@ public class LocalOpenstreetmapActivity extends OsmandExpandableListActivity { } - protected class LocalOpenstreetmapAdapter extends BaseExpandableListAdapter { + protected class LocalOpenstreetmapAdapter extends OsmandBaseExpandableListAdapter { Map> data = new LinkedHashMap>(); List category = new ArrayList(); @@ -419,6 +420,7 @@ public class LocalOpenstreetmapActivity extends OsmandExpandableListActivity { } t.append("]"); nameView.setText(t.toString()); + adjustIndicator(groupPosition, isExpanded, v); return v; }