Make first box active on start and fix keyboard
This commit is contained in:
parent
ee0664034f
commit
91be41417c
1 changed files with 9 additions and 8 deletions
|
@ -128,9 +128,10 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
|
|||
super.onBackPressed();
|
||||
}
|
||||
};
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
Window window = dialog.getWindow();
|
||||
if (window != null) {
|
||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
window.setStatusBarColor(ContextCompat.getColor(getContext(), R.color.coordinate_input_status_bar_color));
|
||||
|
@ -212,6 +213,10 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
|
|||
|
||||
registerEditTexts();
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
latitudeBox.select();
|
||||
}
|
||||
|
||||
final View mapMarkersLayout = mainView.findViewById(R.id.map_markers_layout);
|
||||
|
||||
RecyclerView recyclerView = (RecyclerView) mainView.findViewById(R.id.markers_recycler_view);
|
||||
|
@ -321,10 +326,6 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
|
|||
stopLocationUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
Dialog dialog = getDialog();
|
||||
|
@ -529,7 +530,7 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
|
|||
} else {
|
||||
if (useOsmandKeyboard) {
|
||||
AndroidUtils.hideSoftKeyboard(getActivity(), view);
|
||||
} else if (isOsmandKeyboardCurrentlyVisible()) {
|
||||
} else if (orientationPortrait && isOsmandKeyboardCurrentlyVisible()) {
|
||||
changeOsmandKeyboardVisibility(false);
|
||||
}
|
||||
textFieldBox.setHasFocus(false);
|
||||
|
|
Loading…
Reference in a new issue