small fixes
This commit is contained in:
parent
c4214d0afc
commit
a1215c9a0c
3 changed files with 5 additions and 2 deletions
|
@ -45,6 +45,7 @@ import java.util.ArrayList;
|
|||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import static net.osmand.plus.search.listitems.QuickSearchBannerListItem.INVALID_ID;
|
||||
import static net.osmand.search.core.ObjectType.POI_TYPE;
|
||||
import static net.osmand.plus.search.listitems.QuickSearchBannerListItem.ButtonItem;
|
||||
|
||||
|
@ -240,7 +241,7 @@ public class QuickSearchListAdapter extends ArrayAdapter<QuickSearchListItem> {
|
|||
TextView title = v.findViewById(R.id.title);
|
||||
title.setText(buttonItem.getTitle());
|
||||
ImageView icon = v.findViewById(R.id.icon);
|
||||
if (buttonItem.getIconId() != -1) {
|
||||
if (buttonItem.getIconId() != INVALID_ID) {
|
||||
icon.setImageResource(buttonItem.getIconId());
|
||||
icon.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
|
|
|
@ -9,6 +9,8 @@ import java.util.List;
|
|||
|
||||
public class QuickSearchBannerListItem extends QuickSearchListItem {
|
||||
|
||||
public static final int INVALID_ID = -1;
|
||||
|
||||
private List<ButtonItem> buttons;
|
||||
|
||||
public QuickSearchBannerListItem(OsmandApplication app) {
|
||||
|
|
|
@ -296,7 +296,7 @@ public class WikipediaPlugin extends OsmandPlugin {
|
|||
} else {
|
||||
QuickSearchBannerListItem banner = new QuickSearchBannerListItem(app);
|
||||
banner.addButton(QuickSearchListAdapter.getIncreaseSearchButtonTitle(app, phrase),
|
||||
null, -1, new View.OnClickListener() {
|
||||
null, QuickSearchBannerListItem.INVALID_ID, new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
searchFragment.increaseSearchRadius();
|
||||
|
|
Loading…
Reference in a new issue