183 lines
6.8 KiB
XML
183 lines
6.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Widget-picker preview for the Today widget. Mirrors widget_shell.xml, but
|
|
with literal sample rows: the real shell fills its ListView from a
|
|
RemoteViewsFactory, which the picker never binds, so it would render blank.
|
|
Keep in visual sync with widget_shell.xml + widget_row_task.xml. -->
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="@drawable/widget_background"
|
|
android:orientation="vertical"
|
|
android:paddingStart="16dp"
|
|
android:paddingEnd="16dp"
|
|
android:paddingTop="14dp"
|
|
android:paddingBottom="10dp">
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentStart="true"
|
|
android:layout_centerVertical="true"
|
|
android:layout_toStartOf="@+id/preview_count"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text="@string/widget_today_title"
|
|
android:textColor="@color/widget_text_primary"
|
|
android:textSize="15sp"
|
|
android:textStyle="bold" />
|
|
|
|
<TextView
|
|
android:id="@+id/preview_count"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_centerVertical="true"
|
|
android:layout_toStartOf="@+id/preview_add"
|
|
android:background="@drawable/widget_count_bg"
|
|
android:gravity="center"
|
|
android:minWidth="22dp"
|
|
android:paddingStart="7dp"
|
|
android:paddingEnd="7dp"
|
|
android:paddingTop="2dp"
|
|
android:paddingBottom="2dp"
|
|
android:text="@string/widget_preview_count_today"
|
|
android:textColor="@color/widget_accent"
|
|
android:textSize="12sp"
|
|
android:textStyle="bold" />
|
|
|
|
<ImageView
|
|
android:id="@+id/preview_add"
|
|
android:layout_width="26dp"
|
|
android:layout_height="26dp"
|
|
android:layout_alignParentEnd="true"
|
|
android:layout_centerVertical="true"
|
|
android:layout_marginStart="6dp"
|
|
android:background="@drawable/widget_count_bg"
|
|
android:contentDescription="@string/widget_add_task"
|
|
android:padding="5dp"
|
|
android:src="@drawable/ic_widget_add" />
|
|
</RelativeLayout>
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="1dp"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text="@string/widget_preview_updated"
|
|
android:textColor="@color/widget_text_secondary"
|
|
android:textSize="11sp" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="6dp"
|
|
android:gravity="center_vertical"
|
|
android:minHeight="40dp"
|
|
android:orientation="horizontal"
|
|
android:paddingTop="4dp"
|
|
android:paddingBottom="4dp">
|
|
|
|
<ImageView
|
|
android:layout_width="18dp"
|
|
android:layout_height="18dp"
|
|
android:importantForAccessibility="no"
|
|
android:src="@drawable/widget_ring"
|
|
android:tint="@color/widget_overdue" />
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:layout_weight="1"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text="@string/widget_preview_task_1"
|
|
android:textColor="@color/widget_text_primary"
|
|
android:textSize="14sp" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/widget_meta_overdue"
|
|
android:textColor="@color/widget_overdue"
|
|
android:textSize="12sp" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_vertical"
|
|
android:minHeight="40dp"
|
|
android:orientation="horizontal"
|
|
android:paddingTop="4dp"
|
|
android:paddingBottom="4dp">
|
|
|
|
<ImageView
|
|
android:layout_width="18dp"
|
|
android:layout_height="18dp"
|
|
android:importantForAccessibility="no"
|
|
android:src="@drawable/widget_ring"
|
|
android:tint="@color/widget_ring_neutral" />
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:layout_weight="1"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text="@string/widget_preview_task_2"
|
|
android:textColor="@color/widget_text_primary"
|
|
android:textSize="14sp" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/widget_preview_meta_1"
|
|
android:textColor="@color/widget_text_secondary"
|
|
android:textSize="12sp" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_vertical"
|
|
android:minHeight="40dp"
|
|
android:orientation="horizontal"
|
|
android:paddingTop="4dp"
|
|
android:paddingBottom="4dp">
|
|
|
|
<ImageView
|
|
android:layout_width="18dp"
|
|
android:layout_height="18dp"
|
|
android:importantForAccessibility="no"
|
|
android:src="@drawable/widget_ring"
|
|
android:tint="@color/widget_ring_neutral" />
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:layout_weight="1"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text="@string/widget_preview_task_3"
|
|
android:textColor="@color/widget_text_primary"
|
|
android:textSize="14sp" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/widget_preview_meta_2"
|
|
android:textColor="@color/widget_text_secondary"
|
|
android:textSize="12sp" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|