Refactor expandable names
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 3.3 KiB |
|
@ -1,11 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<!-- checked -->
|
|
||||||
<item android:state_expanded="true" android:drawable="@drawable/list_activities_background_pushed"/>
|
|
||||||
<!-- unchecked noempty -->
|
|
||||||
<item android:state_expanded="false" android:state_empty="false" android:drawable="@drawable/list_activities_background_unpushed"/>
|
|
||||||
<!-- unchecked nempty -->
|
|
||||||
<item android:drawable="@drawable/list_activities_dot_marker1_unpressed"/>
|
|
||||||
|
|
||||||
</selector>
|
|
|
@ -10,7 +10,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:src="@drawable/indicator_custom_gray" />
|
android:src="@drawable/expandable_category_unpushed" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/download_index_category_name"
|
android:id="@+id/download_index_category_name"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:background="@drawable/tab_menu_item_small" >
|
android:background="@drawable/tab_menu_item_small" >
|
||||||
|
|
||||||
<ImageView android:src="@drawable/indicator_custom_gray"
|
<ImageView android:src="@drawable/expandable_category_unpushed"
|
||||||
android:id="@+id/explist_indicator"
|
android:id="@+id/explist_indicator"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:src="@drawable/indicator_custom_gray" />
|
android:src="@drawable/expandable_category_unpushed" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/local_index_category_name"
|
android:id="@+id/local_index_category_name"
|
||||||
|
|
|
@ -1,8 +1,17 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/tab_menu_item_small">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/explist_indicator"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:src="@drawable/expandable_category_unpushed" />
|
||||||
|
|
||||||
<TextView android:id="@+id/local_openstreetmap_category_name" android:gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content"
|
<TextView android:id="@+id/local_openstreetmap_category_name" android:gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||||
android:textSize="21sp" android:layout_marginLeft="40dp"></TextView>
|
android:textSize="21sp" android:layout_marginLeft="10dp"></TextView>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -11,12 +11,12 @@ public abstract class OsmandBaseExpandableListAdapter extends BaseExpandableList
|
||||||
ImageView indicator = (ImageView) row.findViewById(R.id.explist_indicator);
|
ImageView indicator = (ImageView) row.findViewById(R.id.explist_indicator);
|
||||||
if (!isExpanded) {
|
if (!isExpanded) {
|
||||||
if (getChildrenCount(groupPosition) == 0) {
|
if (getChildrenCount(groupPosition) == 0) {
|
||||||
indicator.setImageResource(R.drawable.list_activities_dot_marker1_unpressed);
|
indicator.setImageResource(R.drawable.expandable_category_empty);
|
||||||
} else {
|
} else {
|
||||||
indicator.setImageResource(R.drawable.list_activities_background_unpushed);
|
indicator.setImageResource(R.drawable.expandable_category_unpushed);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
indicator.setImageResource(R.drawable.list_activities_background_pushed);
|
indicator.setImageResource(R.drawable.expandable_category_pushed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.ProgressDialogImplementation;
|
import net.osmand.plus.ProgressDialogImplementation;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
import net.osmand.plus.activities.OsmandBaseExpandableListAdapter;
|
||||||
import net.osmand.plus.activities.OsmandExpandableListActivity;
|
import net.osmand.plus.activities.OsmandExpandableListActivity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
|
@ -273,7 +274,7 @@ public class LocalOpenstreetmapActivity extends OsmandExpandableListActivity {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected class LocalOpenstreetmapAdapter extends BaseExpandableListAdapter {
|
protected class LocalOpenstreetmapAdapter extends OsmandBaseExpandableListAdapter {
|
||||||
Map<Long, List<OsmPoint>> data = new LinkedHashMap<Long, List<OsmPoint>>();
|
Map<Long, List<OsmPoint>> data = new LinkedHashMap<Long, List<OsmPoint>>();
|
||||||
List<Long> category = new ArrayList<Long>();
|
List<Long> category = new ArrayList<Long>();
|
||||||
|
|
||||||
|
@ -419,6 +420,7 @@ public class LocalOpenstreetmapActivity extends OsmandExpandableListActivity {
|
||||||
}
|
}
|
||||||
t.append("]");
|
t.append("]");
|
||||||
nameView.setText(t.toString());
|
nameView.setText(t.toString());
|
||||||
|
adjustIndicator(groupPosition, isExpanded, v);
|
||||||
|
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|