1

含まれているビューをレイアウトの下部にプッシュしようとしていますが、運がありません。現在、レイアウトの上部に配置されています。同じコードは次のとおりです。

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/altercolor2"
    android:clickable="true"
    android:orientation="vertical" >

    <include
        layout="@layout/layout_grid_details_header_view"
        android:visibility="gone" />

     <include layout="@layout/last_updated_time" />

    <RelativeLayout
        android:id="@+id/markets_column_names"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/black"
        android:paddingBottom="3dp" >

        <TextView
            android:id="@+id/markets_column_name1"
            android:layout_width="75dp"
            android:layout_height="wrap_content"
            android:layout_toLeftOf="@+id/markets_column_name2"
            android:textSize="12sp"
            android:gravity="right" />

        <TextView
            android:id="@+id/markets_column_name2"
            android:layout_width="75dp"
            android:layout_height="wrap_content"
            android:layout_toLeftOf="@+id/markets_column_name3"
            android:textSize="12sp"
            android:gravity="right" />

        <TextView
            android:id="@+id/markets_column_name3"
            android:layout_width="85dp"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:textSize="12sp"
            android:paddingRight="6dp"
            android:gravity="right" />
    </RelativeLayout>

    <com.handmark.pulltorefresh.library.PullToRefreshListView
        android:id="@+id/markets_grid_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />



       <include layout="@layout/loading_no_results" />

</LinearLayout>

私がリストの一番下で切り替えようとしている主なものは次のとおりです: <include layout="@layout/last_updated_time" /> だから、私はまた、paddingbottomとlayout_belowを設定しようとしました:相対レイアウトIDを試し、layout_gravity = bottomとgravity =botttomを設定しようとしましたが、まだ運がありません.方法の手がかりこれをビューの下部に押して、リストが長くても表示されたままにしますが、ビューの下部にリストビューを重ねるようにします。

ありがとう!ジャスティン

4

3 に答える 3

2

「 include tag」layout_widthlayout_height属性を指定すると、その親タグ属性のいずれかを指定できます

于 2019-02-19T12:30:34.270 に答える
0

フレーム レイアウトを使用してみてください: 現在の linearlayout を最初の子として作成します (下部に移動するインクルード ビューを削除します)。インクルード ビューを 2 番目のビューとして作成し、その layout_gravity を下に設定します。

于 2013-08-20T20:21:08.247 に答える