【问题标题】:windowSoftInputMode adjustPan: How to add more margin to text field of DatePicker (spinner mode)windowSoftInputMode adjustPan:如何为 DatePicker 的文本字段添加更多边距(微调器模式)
【发布时间】:2021-10-12 04:42:00
【问题描述】:

当文本字段获得焦点时,我希望 Activity 有一个偏移量作为微调器容器。

我想要达到的目标:

我得到了什么:

我怎样才能获得想要的行为?有没有办法将任何视图包装在adjustPan 会尊重的容器中?

【问题讨论】:

    标签: android focus adjustpan


    【解决方案1】:

    将windowSoftInputMode 属性设置为adjustResize

    <activity android:windowSoftInputMode="adjustResize"></activity>
    

    【讨论】:

    • 不,它不适合我。我不想重新排列 UI。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-12-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多