Skip to content

Commit 15c7801

Browse files
authored
Merge pull request #58 from mahomaps/list-fitpolicy
Search screen set fit policy
2 parents 6c3be1a + c998206 commit 15c7801

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mahomaps/screens/SearchScreen.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ public class SearchScreen extends List implements CommandListener {
2626

2727
public SearchScreen(String query, Geopoint point, JSONArray results) {
2828
super(query, Choice.IMPLICIT);
29+
setFitPolicy(TEXT_WRAP_ON);
2930
this.query = query;
3031
this.results = results;
3132
for (int i = 0; i < results.length(); i++) {
3233
JSONObject obj = results.getJSONObject(i);
3334
JSONObject props = obj.getJSONObject("properties");
34-
append(props.getString("name") + "\n" + props.optString("description", ""), null);
35+
append(props.getString("name") + " (" + props.optString("description", "") + ")", null);
3536
}
3637
MahoMapsApp.lastSearch = this;
3738
overlay = new SearchOverlay(point, query, results, this);

0 commit comments

Comments
 (0)