Merge pull request #653 from krabaey/feature-search-poi-keyboard

set focus on search field and enable keyboard
This commit is contained in:
Hardy 2014-05-25 12:00:59 +02:00
commit de0d962ce4

View file

@ -261,6 +261,14 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
});
searchFilter.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus) {
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
}
}
});
addFooterView();
amenityAdapter = new AmenityAdapter(new ArrayList<Amenity>());
setListAdapter(amenityAdapter);
@ -364,6 +372,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
}
app.getLocationProvider().addCompassListener(this);
app.getLocationProvider().registerOrUnregisterCompassListener(true);
searchFilter.requestFocus();
}