GeneralBongwallis
GeneralBongwallis

Reputation: 3

Screen jumps when calling a dialogfragment

I am calling a dialogfragment from a FragmentActivity which I am using the dialogfragment as a datepicker. I have an edittext box that fires the onFocusChangedListener to call the dialogfragment. Everything loads fine, except that the dialog and activity "jump" up then settle into place. I am fairly new to android programming and I havent told it to do anything but open the datepicker. There is no custom theme or style.

Im posting from my phone right now, so its hard to paste code.

Upvotes: 0

Views: 636

Answers (1)

Apoorv
Apoorv

Reputation: 13520

This is possibly happening because Android try to opens the keyboard when the EditTextis clicked.

Insated in your XML add

android:focusable="false"
android:focusableInTouchMode="false"

to the EditText and move the code from onFocusChangedListener to onClickListener

Upvotes: 2

Related Questions