tôi đã cùng một vấn đề, không có gì mà tôi tìm thấy đã thực sự làm việc, vì tôi đã phải đối phó với thanh hẹp của thanh tác vụ, sau đó trên các thiết bị lớn, các nút được đặt trên đầu thay vì dưới cùng. Vì vậy, tôi cuối cùng đã giải quyết nó bằng cách đặt một "chân" trong bố cục chính:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content">
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="false"
android:layout_above="@+id/footer">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:id="@+id/container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/body_padding_large"
android:paddingRight="@dimen/body_padding_large"
android:paddingTop="@dimen/body_padding_medium"
android:paddingBottom="@dimen/body_padding_medium"
android:gravity="top">
</LinearLayout>
</ScrollView>
<LinearLayout android:id="@+id/footer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
style="@android:style/ButtonBar">
<Button android:id="@+id/btn_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Button 1" />
<Button android:id="@+id/btn_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Button 2" />
</LinearLayout>
</RelativeLayout>
vâng làm thế nào để hiển thị biểu tượng tràn ở đầu ??? – samirprogrammer