阅读背景:

为什么我的线性布局与我在listview中的父母高度不匹配呢?

来源:互联网 

I have the following code

我有以下代码。

    <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="https://schemas.android.com/apk/res/android"
    android:id="@+id/itemLayoutView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/list_view_layout_margin"
    android:paddingRight="@dimen/list_view_layout_margin" 
    android:background="@color/yellow">

    <LinearLayout
        android:id="@+id/itemLinearLayoutView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/gameNameView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="@dimen/game_list_text_size" />

        <TextView
            android:id="@+id/gameCreationDateView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/gray"
            android:textSize="@dimen/small_text_size"
            android:textStyle="italic" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/LinearLayoutView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/red"
        android:orientation="horizontal" >

        <Button
            android:id="@+id/infoButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/info" />

        <Button
            android:id="@+id/deleteButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/delete" />
    </LinearLayout>


</RelativeLayout>
    <?xml



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: