我有一个ListView,其中包含由以下内容组成的项目RelativeLayout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.app.FragmentList">
<ListView
android:id="@+id/ListView01"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_alignParentLeft="false"
android:layout_alignParentTop="true"
android:fastScrollEnabled="true"
android:fastScrollAlwaysVisible="true"
android:smoothScrollbar="false"
android:scrollingCache="true" />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
这几项:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
android:paddingTop="8dp"
android:paddingBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Erika Mustermann"
android:id="@+id/textViewName"
android:layout_marginLeft="8dp"
android:layout_marginBottom="-3dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Company Inc."
android:id="@+id/textViewCompany"
android:layout_marginLeft="24dp"
android:textColor="#6b6b6b"
android:textSize="13dp"
android:visibility="gone" />
<RelativeLayout android:id="@+id/RelativeLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:id="@+id/linearLayout_one"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="24dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Work: "
android:id="@+id/NumLabel0"
android:textColor="#6b6b6b" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="+49-1234-1234567" …Run Code Online (Sandbox Code Playgroud) android listview android-layout android-listview android-cursoradapter