I have text area and and down to that "ok" and "cancel" button. when i click on text area keyboard appear and focus on the text area and buttons get hide behind the keyboard.
i want when text area get focus scroll a little bit and also display the bottom buttons while text area id selected.
i fixed it by myself :D following is the code
i called the following method when textfield gain the focus
private final void focusOnButtons(){
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
ScrollView sv = (ScrollView)findViewById(R.id.scrl);
sv.scrollTo(0, sv.getBottom());
}
},1000);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With