我该如何转移的<&包括GT;布局视图的底部我该、视图、布局、GT

2023-09-07 10:04:14 作者:吶誰!ωǒ噯伱

我想我的观点包括推到布局的底部,但是我没有任何luck.Currently它放置在布局。code的顶部同样是如下:

I am trying to push my included view to the bottom of the layout, however I am not having any luck.Currently it's placed at the top of the layout.The code for the same is as follows:

<?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>

我期待在列表的底部切换的主要事情是:&LT;包括布局=@布局/ last_updated_time/&GT; 所以,我想我也试着设置paddingBottom会andlayout_below:relavitive布局ID,并试图设置layout_gravity =底部和重力= botttom,仍然没有线索luck.Any如何在视图底部推动这使得它仍然可见即使列表很长,但在该视图的底部,如在底部重叠列表视图。

The main thing I am looking to switch at the bottom of the list is : <include layout="@layout/last_updated_time" /> so, I tried I also tried setting paddingbottom andlayout_below: relavitive layout id, and tried setting layout_gravity = bottom and gravity = botttom, still no luck.Any clue how to push this at the bottom of the view such that it still remains visible even if the list is long, but at the bottom of the view, like overlapping the list view at the bottom.

谢谢!贾斯汀

推荐答案

尝试使用框架布局:使你当前的LinearLayout作为第一个孩子(移除ü要移至底部包括视图)。使包括视图第二种观点,并设置其layout_gravity上下。

Try using frame layout : make your current linearlayout as first child (removing the include view that u want to move to bottom). Make the include view as second view and set its layout_gravity to bottom.