Rishabh Saxena
Rishabh Saxena

Reputation: 1795

How to smoothly adjust screen when keyboard opens and layout at keyboard height hides?

enter image description here

I have options like Facebook messenger same at the height of keyboard. When ever my edit text gain focus, I hide the options and keyboard opens up automatically at same height. This is working fine but gives a jerky experience to user & it is not smooth as messenger application. Any way of opening keyboard over my layout without giving jerky experience to user or any other way of layout creation, management & animation ?

etChatMsg.setOnFocusChangeListener(new View.OnFocusChangeListener() {
            @Override
            public void onFocusChange(View v, boolean hasFocus) {
                if (hasFocus) {
                    hideBottomOptions();
                }
            }
        });   

Upvotes: 3

Views: 92

Answers (0)

Related Questions