bytedance / scene

Android Single Activity Framework compatible with Fragment.
Apache License 2.0
2.08k stars 198 forks source link

软键盘问题 #28

Closed Iridescentangle closed 4 years ago

Iridescentangle commented 4 years ago

请教一下,按照Demo中的示例,在有输入框的页面确实是这么做的 image 但是好像并没有生效... image image 请问是否别的地方也需要配置呢?比如说Manifest文件?我配置的为android:windowSoftInputMode="adjustResize"

qii commented 4 years ago

https://github.com/bytedance/scene/blob/master/demo/src/main/AndroidManifest.xml#L17

qii commented 4 years ago

我记得我的 demo 里面有说明 android 这个bug 来着,忘了

Iridescentangle commented 4 years ago

https://github.com/bytedance/scene/blob/master/demo/src/main/AndroidManifest.xml#L17

为啥要默认配置adjustNothing呢...

Iridescentangle commented 4 years ago

https://github.com/bytedance/scene/blob/master/demo/src/main/AndroidManifest.xml#L17

试了,也还是不行...布局上是否有要求呢?

qii commented 4 years ago

https://github.com/bytedance/scene/blob/master/demo/src/main/AndroidManifest.xml#L17

为啥要默认配置adjustNothing呢...

不晓得,好像是 Android 的 bug

你试试跑demo里面的输入法演示,能成功切换三种输入法模式吗

Iridescentangle commented 4 years ago

https://github.com/bytedance/scene/blob/master/demo/src/main/AndroidManifest.xml#L17

为啥要默认配置adjustNothing呢...

不晓得,好像是 Android 的 bug

你试试跑demo里面的输入法演示,能成功切换三种输入法模式吗

Demo里的是可以的...不过我的项目中就是纹丝不动了...

Iridescentangle commented 4 years ago

https://github.com/bytedance/scene/blob/master/demo/src/main/AndroidManifest.xml#L17

为啥要默认配置adjustNothing呢...

不晓得,好像是 Android 的 bug

你试试跑demo里面的输入法演示,能成功切换三种输入法模式吗

方便加一下微信么...实在琢磨不出错在哪里... image

qii commented 4 years ago

你的布局是不是没有包着 ScrollView 或者 RecyclerView/ListView 啊,你把布局贴到普通的 Activity 试试

Iridescentangle commented 4 years ago

你的布局是不是没有包着 ScrollView 或者 RecyclerView/ListView 啊,你把布局贴到普通的 Activity 试试

试了一下,如果是放到普通的Activity中就可以了.最后我选择的处理办法是Activity清单中注册windowSoftInputMode,页面布局最外层ConstraintLayout,里面是ScrollView,然后ScrollView的内容设置超过一屏的长度,最后生效了....Demo中动态更改的代码没用上... 虽然解决了...但还是云里雾里...不过非常感谢您的帮助!!!感谢!!!