Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 Android 中创建一个页面,即使用户按下后退按钮(在这种情况下,我希望应用程序返回最后一页),键盘也始终显示。 例如:当您在该应用程序中撰写帖子时,Facebook 所做的页面。
谢谢!
在文件中添加android:windowSoftInputMode="stateAlwaysVisible"您的活动AndroidManifest.xml:
android:windowSoftInputMode="stateAlwaysVisible"
AndroidManifest.xml
<activity android:name=".MainActivity" android:label="@string/app_name" android:windowSoftInputMode="stateAlwaysVisible" />