diff --git a/OsmAnd/src/net/osmand/plus/activities/FontFitTextView.java b/OsmAnd/src/net/osmand/plus/activities/FontFitTextView.java index e0cb9c107a..c9e6ceed46 100644 --- a/OsmAnd/src/net/osmand/plus/activities/FontFitTextView.java +++ b/OsmAnd/src/net/osmand/plus/activities/FontFitTextView.java @@ -54,7 +54,11 @@ public class FontFitTextView extends TextView { //if (getLineCount() != lines) { setLines(lines); setMaxLines(lines); - setGravity(Gravity.TOP); + if( lines == 1) { + setGravity(Gravity.CENTER_VERTICAL); + } else { + setGravity(Gravity.TOP); + } //} setTextSize(TypedValue.COMPLEX_UNIT_PX, tp.getTextSize()); } diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java index 5890ad66cf..bd994dacdf 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchByNameAbstractActivity.java @@ -238,24 +238,25 @@ public abstract class SearchByNameAbstractActivity 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(); - } + itemSelected(obj); +// 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);