Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-05-03 09:28:56 +02:00
commit 7cbdaa6161

View file

@ -276,18 +276,17 @@ public class MapActivityLayers {
app.getSettings().isLightContent()); app.getSettings().isLightContent());
final ListView listView = new ListView(activity); final ListView listView = new ListView(activity);
listView.setDivider(null); listView.setDivider(null);
listView.setClickable(true);
listView.setAdapter(listAdapter); listView.setAdapter(listAdapter);
listView.setOnItemClickListener( listView.setOnItemClickListener(new ListView.OnItemClickListener() {
new ListView.OnItemClickListener() { @Override
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) { ContextMenuItem item = listAdapter.getItem(position);
ContextMenuItem item = listAdapter.getItem(position); item.setSelected(!item.getSelected());
PoiUIFilter filter = list.get(position); item.getItemClickListener().onContextMenuClick(listAdapter, position, position, item.getSelected());
boolean isChecked = getApplication().getPoiFilters().isPoiFilterSelected(filter); listAdapter.notifyDataSetChanged();
item.getItemClickListener().onContextMenuClick(listAdapter, position, position, !isChecked); }
listAdapter.notifyDataSetChanged(); });
}
});
builder.setView(listView); builder.setView(listView);
builder.setTitle(R.string.show_poi_over_map) builder.setTitle(R.string.show_poi_over_map)
.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() { .setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {