set focus on search field and enable keyboard
This commit is contained in:
parent
ecc07567d1
commit
fd7aa56587
1 changed files with 9 additions and 0 deletions
|
@ -261,6 +261,14 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
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();
|
addFooterView();
|
||||||
amenityAdapter = new AmenityAdapter(new ArrayList<Amenity>());
|
amenityAdapter = new AmenityAdapter(new ArrayList<Amenity>());
|
||||||
setListAdapter(amenityAdapter);
|
setListAdapter(amenityAdapter);
|
||||||
|
@ -364,6 +372,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
}
|
}
|
||||||
app.getLocationProvider().addCompassListener(this);
|
app.getLocationProvider().addCompassListener(this);
|
||||||
app.getLocationProvider().registerOrUnregisterCompassListener(true);
|
app.getLocationProvider().registerOrUnregisterCompassListener(true);
|
||||||
|
searchFilter.requestFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue