Adjust scrollview when keyboard is up

前端 未结 6 1112
抹茶落季
抹茶落季 2021-01-08 00:43

I have an activity with a form in it. Because the form is quite long, I\'ve used a scrollview.

The problem is that the scrollview doesn\'t change when the keyboard i

6条回答
  •  臣服心动
    2021-01-08 00:56

    if you use fragment, you just need to use the code to control it, like below

    context.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);

提交回复
热议问题