Revert changes for address search

This commit is contained in:
Victor Shcherb 2012-08-25 12:47:07 +02:00
parent f07399c3a7
commit bb111f8dd4
2 changed files with 24 additions and 19 deletions

View file

@ -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());
}

View file

@ -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);