Updated onChildClick functionality for listview
This commit is contained in:
parent
b8b03cca25
commit
20c940a0c8
3 changed files with 4 additions and 14 deletions
|
@ -64,7 +64,10 @@ public abstract class OsmandExpandableListFragment extends SherlockFragment impl
|
|||
|
||||
public ExpandableListView getExpandableListView() { return listView; }
|
||||
|
||||
public void setListView(ExpandableListView listView) { this.listView = listView;}
|
||||
public void setListView(ExpandableListView listView) {
|
||||
this.listView = listView;
|
||||
listView.setOnChildClickListener(this);
|
||||
}
|
||||
|
||||
public MenuItem createMenuItem(Menu m, int id, int titleRes, int iconLight, int iconDark, int menuItemType) {
|
||||
int r = isLightActionBar() ? iconLight : iconDark;
|
||||
|
|
|
@ -236,12 +236,6 @@ public class DownloadIndexAdapter extends OsmandBaseExpandableListAdapter implem
|
|||
v = inflater.inflate(net.osmand.plus.R.layout.download_index_list_item, parent, false);
|
||||
}
|
||||
final View row = v;
|
||||
row.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
downloadFragment.onChildClick(downloadFragment.getExpandableListView(), row, groupPosition, childPosition, getChildId(groupPosition, childPosition));
|
||||
}
|
||||
});
|
||||
TextView item = (TextView) row.findViewById(R.id.download_item);
|
||||
TextView description = (TextView) row.findViewById(R.id.download_descr);
|
||||
IndexItem e = (IndexItem) getChild(groupPosition, childPosition);
|
||||
|
|
|
@ -868,13 +868,6 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
|||
LayoutInflater inflater = (LayoutInflater) getDownloadActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
v = inflater.inflate(net.osmand.plus.R.layout.local_index_list_item, parent, false);
|
||||
}
|
||||
final View row = v;
|
||||
row.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
onChildClick(getExpandableListView(), row, groupPosition, childPosition, getChildId(groupPosition, childPosition));
|
||||
}
|
||||
});
|
||||
TextView viewName = ((TextView) v.findViewById(R.id.local_index_name));
|
||||
String mapDescr = getMapDescription(child.getFileName());
|
||||
String mapName = FileNameTranslationHelper.getFileName(ctx, ((OsmandApplication) getDownloadActivity().getApplication()).getResourceManager().getOsmandRegions(), child.getFileName());
|
||||
|
|
Loading…
Reference in a new issue