Giter VIP home page Giter VIP logo

Comments (8)

luoqqsh avatar luoqqsh commented on July 19, 2024 1

对于你写得框架,存在着一些疑问,所以我没提PL。如果有空,能解答下吗?
1.
image
这个判断的方法是来自官方文档demo,还是根据你实测的结果写得。WindowInsetsAnimationCompat这个方法是30之后才有的,但我目前没发现有不兼容的情况
2.
image
上面绿色框的设置成SOFT_INPUT_ADJUST_NOTHING这个是为啥?实测设置了这个,会导致下面的回调接口不起作用。

from soft-input-event.

liangjingkanji avatar liangjingkanji commented on July 19, 2024

能fork仓库复现吗?

from soft-input-event.

luoqqsh avatar luoqqsh commented on July 19, 2024

在你的demo上activity_main.xml修改,把输入框放到recyclerview的上面,此时输入框在顶部,按理说是不需要因为弹出键盘而被拉下来的。就是这个导致了我截图的异常页面。需要fork仓库的话要晚点,我的描述很容易复现的

from soft-input-event.

luoqqsh avatar luoqqsh commented on July 19, 2024

我这边的需求就像截图一样,一整个屏幕就像填表格一样,左边是要填写的说明,右边是可编辑的内容,每一行都是一个textview+edittext,可以滚动。
期望自动判断,有被挡住的才被键盘推上去,不会被挡住的,不受影响。或者说,当编辑框已经在顶部时,就不要再继续滚动了,强行拉下来。

from soft-input-event.

luoqqsh avatar luoqqsh commented on July 19, 2024

https://github.com/luoqqsh/soft-input-event
fork了,在你原来首页下方发送的边上加了个jump按钮,跳转到新页面,然后你点上方的输入框就能看到问题

from soft-input-event.

liangjingkanji avatar liangjingkanji commented on July 19, 2024
  1. 本框架并未支持多个控件自动悬浮在键盘上, 设计之初由于实现难度更大并且我个人没有这个需求所以没有去支持
  2. 重复调用setWindowSoftInput会存在覆盖效果, 并不会正常生效

支持多个控件的需求得等我有空才能支持(工作繁忙), 如果你有实现这部分功能可以发起pr合并

from soft-input-event.

luoqqsh avatar luoqqsh commented on July 19, 2024

问题不在于多个控件自动悬浮在键盘上,而是会把在上面的输入框(键盘不会挡住的)给拉下来了。
image
在这里加个判断就可以解决,我看你另一个解决方案就有做这个处理
image

from soft-input-event.

liangjingkanji avatar liangjingkanji commented on July 19, 2024

这是我认为市面上没有一款简单并且自带动画的键盘监听工具才设计的一个工具, 但是兼容问题可能的确需要一直迭代

  1. 这是我根据反复尝试试出来的....
  2. 如果不设置SOFT_INPUT_ADJUST_NOTHING, 键盘弹出后会无法成功计算布局应该滑动的距离

from soft-input-event.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.