在 XML 中让按钮粘在屏幕底部并在弹出时粘在键盘上非常简单,我们可以做这样的事情
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
//the ui views
<TableLayout
android:id="@+id/m_table_menu"
style="@style/table_layout_style">
<View style="@style/view_style" />
<TableRow style="@style/table_row_button_style">
//This button sticks to the bottom of the screen or to the keyboard when its open
<Button
android:id="@+id/save_user_name"
style="@style/green_bottom_sticky_button"
android:background="@drawable/green_disabled_ripple_rectangular_button"
android:enabled="false"
android:text="@string/next" />
</TableRow>
</TableLayout>
</RelativeLayout>
我们将如何在 Jetpack compose 中复制它?