<?xml version="1.0" encoding="utf-8"?>

<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/note_item"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:padding="12dp"
    android:background="@null">

    <!-- 标题行 -->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:gravity="center_vertical">

        <TextView
            android:id="@+id/tv_title"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:textSize="16sp"
            android:textColor="@android:color/black"
            android:textStyle="bold"
            android:maxLines="1"
            android:ellipsize="end"
            android:singleLine="true" />

        <TextView
            android:id="@+id/tv_time"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:textSize="12sp"
            android:textColor="@android:color/darker_gray" />
    </LinearLayout>

    <!-- 通话名称行（用于通话记录） -->
    <TextView
        android:id="@+id/tv_name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="2dp"
        android:textSize="14sp"
        android:textColor="@android:color/darker_gray"
        android:maxLines="1"
        android:ellipsize="end"
        android:visibility="gone" />

    <!-- 底部控制行：复选框和提醒图标 -->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="4dp"
        android:orientation="horizontal"
        android:gravity="center_vertical">

        <CheckBox
            android:id="@android:id/checkbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:focusable="false"
            android:clickable="false"
            android:visibility="gone" />

        <ImageView
            android:id="@+id/iv_alert_icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="4dp"
            android:visibility="gone" />

        <!-- 填充空间 -->
        <View
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_weight="1" />

        <ImageView
            android:id="@+id/iv_pinned_icon"
            android:layout_width="16dp"
            android:layout_height="16dp"
            android:src="@android:drawable/ic_menu_upload"
            android:tint="@android:color/darker_gray"
            android:visibility="gone" />
    </LinearLayout>

</LinearLayout>
