Revert changes for address search
This commit is contained in:
parent
f07399c3a7
commit
bb111f8dd4
2 changed files with 24 additions and 19 deletions
|
@ -54,7 +54,11 @@ public class FontFitTextView extends TextView {
|
|||
//if (getLineCount() != lines) {
|
||||
setLines(lines);
|
||||
setMaxLines(lines);
|
||||
if( lines == 1) {
|
||||
setGravity(Gravity.CENTER_VERTICAL);
|
||||
} else {
|
||||
setGravity(Gravity.TOP);
|
||||
}
|
||||
//}
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, tp.getTextSize());
|
||||
}
|
||||
|
|
|
@ -238,24 +238,25 @@ public abstract class SearchByNameAbstractActivity<T> extends OsmandListActivity
|
|||
return getText(obj);
|
||||
}
|
||||
public void itemSelectedBase(final T obj, View v) {
|
||||
LatLon loc = getLocation(obj);
|
||||
if (obj != null && loc != null) {
|
||||
QuickAction qa = new QuickAction(v);
|
||||
ActionItem ai = new ActionItem();
|
||||
ai.setTitle("Default");
|
||||
ai.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
itemSelected(obj);
|
||||
}
|
||||
});
|
||||
qa.addActionItem(ai);
|
||||
// TODO more granular description and text message!
|
||||
MapActivityActions.createDirectionsActions(qa, loc,
|
||||
obj, getText(obj), getZoomToDisplay(endingObject),
|
||||
SearchByNameAbstractActivity.this, true, null);
|
||||
qa.show();
|
||||
}
|
||||
// LatLon loc = getLocation(obj);
|
||||
// if (obj != null && loc != null) {
|
||||
// QuickAction qa = new QuickAction(v);
|
||||
// ActionItem ai = new ActionItem();
|
||||
// ai.setTitle("Default");
|
||||
// ai.setOnClickListener(new OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// itemSelected(obj);
|
||||
// }
|
||||
// });
|
||||
// qa.addActionItem(ai);
|
||||
// // TODO more granular description and text message!
|
||||
// MapActivityActions.createDirectionsActions(qa, loc,
|
||||
// obj, getText(obj), getZoomToDisplay(endingObject),
|
||||
// SearchByNameAbstractActivity.this, true, null);
|
||||
// qa.show();
|
||||
// }
|
||||
}
|
||||
public abstract void itemSelected(T obj);
|
||||
|
||||
|
|
Loading…
Reference in a new issue