发生在我身上的事情非常棘手......我有这个 xml 文件作为列表视图对象的适配器的布局:
<?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="wrap_content"
android:background="@color/exBackGround"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@color/exBackGround" >
<ImageView
android:id="@+id/imgIcon"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="@color/exBackGround"
android:src="@drawable/ic_launcher" />
<TextView
android:id="@+id/lblFolderName"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/exBackGround"
android:gravity="center_vertical"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/exForeGround" />
<TextView
android:id="@+id/lblNumber"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/exBackGround"
android:gravity="center_vertical"
android:paddingRight="5dp"
android:text="100"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/exForeGround" />
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/exGradEnd" >
</FrameLayout>
</LinearLayout>
我不明白为什么,这种布局导致了预期的结果,加上顶部的一条黑线,我无法理解它的来源。不幸的是,作为一个新用户,我不能发布图像,对不起。