简体   繁体   English

单击fab时将EditText(或布局)移动到键盘上方

[英]Move EditText (or a layout) above the keyboard when you click a fab

So, I saw that thing in the Todoist app. 因此,我在Todoist应用程序中看到了该内容。 When you click the add fab, the keyboard pops up with some layout above it where you can enter text and set some things. 单击添加工厂时,会弹出键盘,键盘上方有一些布局,您可以在其中输入文本并进行一些设置。 How can I do it? 我该怎么做?

This is how the thing actually looks: 这是实际的样子:

Is there some example on how this is done? 有一些有关如何完成此操作的示例吗?

(please don't mind that this is the iOS version of the app, I don't own a android device) (请不要介意这是该应用程序的iOS版本,我没有android设备)

用片段制作底片并编辑片段中的文本,并设置按钮fab以在单击时显示底片,如果需要,您可以设置底片可见性GONE

Add this android:windowSoftInputMode="stateHidden" line in your Activity block in manifist.xml file like this 像这样在您的活动块的manifist.xml文件中添加此android:windowSoftInputMode="stateHidden"

<activity
            android:name=".Activities.DashboardActivity"
            android:label="@string/title_activity_dashboard"
            android:windowSoftInputMode="stateHidden"
            android:theme="@style/AppTheme.NoActionBar">
    </activity>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM