List view layout similar to call log of android

∥☆過路亽.° 提交于 2019-12-24 15:26:57

问题


i want to create a layout just similar to

for this i am creating a layout for the row of ListView. can you please describe me what are the components they are using to create this row's layout.

below is the coding that i am using to create row of ListView.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >

<LinearLayout
    android:layout_width="0dp"
    android:layout_height="fill_parent"
    android:layout_weight="1"
    android:orientation="vertical"
    android:padding="8dp" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        tools:ignore="UseCompoundDrawables" >

        <TextView
            android:id="@+id/callDetailName"
            android:layout_width="0dp"
            android:layout_height="fill_parent"
            android:layout_weight="1"
            android:text="name"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:textStyle="bold"
            tools:ignore="HardcodedText" />

        <ImageView
            android:id="@+id/callDetailType"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_gravity="right|center_vertical"
            tools:ignore="ContentDescription" />

    </LinearLayout>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <TextView
            android:id="@+id/callDetailNumber"
            android:layout_width="0dp"
            android:layout_height="fill_parent"
            android:layout_weight="1"
            android:text="number"
            android:textAppearance="?android:attr/textAppearanceSmall"
            tools:ignore="HardcodedText" />

        <TextView
            android:id="@+id/callDetailTime"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:text="TextView"
            android:textAppearance="?android:attr/textAppearanceSmallInverse"
            tools:ignore="HardcodedText" />
    </LinearLayout>
</LinearLayout>

<ImageView
    android:layout_width="wrap_content"
    android:layout_height="fill_parent"
    android:layout_gravity="center"
    android:padding="5dp"
    android:scaleType="fitXY"
    android:src="@android:drawable/dark_header"
    tools:ignore="ContentDescription" />

<ImageButton
    android:id="@+id/callBackBtn"
    android:layout_width="wrap_content"
    android:layout_height="fill_parent"
    android:layout_gravity="center"
    android:background="#00000000"
    android:minWidth="50dp"
    android:src="@android:drawable/sym_action_call"
    tools:ignore="ContentDescription" />

来源:https://stackoverflow.com/questions/14121601/list-view-layout-similar-to-call-log-of-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!