ntfy-android/app/src/main/res/layout/fragment_detail_item.xml

64 lines
4.2 KiB
XML
Raw Normal View History

2021-11-23 09:45:43 +13:00
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:orientation="horizontal" android:clickable="true"
2021-11-28 10:18:09 +13:00
android:focusable="true"
>
2021-11-23 09:45:43 +13:00
<TextView
android:text="Sun, October 31, 2021, 10:43:12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/detail_item_date_text"
2021-11-28 10:18:09 +13:00
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="10dp" app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="10dp"/>
2021-11-23 09:45:43 +13:00
<TextView
android:layout_width="10dp"
2021-11-28 10:18:09 +13:00
android:layout_height="10dp" android:id="@+id/detail_item_new_dot"
2021-11-23 09:45:43 +13:00
android:layout_gravity="center"
android:background="@drawable/ic_circle"
android:gravity="center"
app:layout_constraintTop_toTopOf="@+id/detail_item_date_text"
app:layout_constraintBottom_toBottomOf="@+id/detail_item_date_text"
2021-11-28 10:18:09 +13:00
android:layout_marginTop="1dp"
app:layout_constraintStart_toEndOf="@id/detail_item_priority_image"
2021-11-23 09:45:43 +13:00
android:layout_marginStart="5dp"/>
<TextView
android:text="This is a very very very long message. It could be as long as 1024 charaters, which is a lot more than you'd think. No, really so far this message is barely 180 characters long. I can't believe how long 1024 bytes are. This is outrageous. Oh you know what, I think I won't type the whole thing. This seems a little too long for a sample text. Well, anyway, it was nice chatting. So far this message is about 400 bytes long. So maybe just double what you see and that's that."
2021-11-28 10:18:09 +13:00
android:layout_width="0dp"
2021-11-23 09:45:43 +13:00
android:layout_height="wrap_content"
android:id="@+id/detail_item_message_text"
android:textColor="@color/primaryTextColor"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
2021-11-28 10:18:09 +13:00
app:layout_constraintTop_toBottomOf="@id/detail_item_title_text"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="10dp"
app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="10dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="10dp"/>
<TextView
android:text="This is an optional title. It can also be a little longer but not too long."
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/detail_item_title_text"
android:textColor="@color/primaryTextColor"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="10dp"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="10dp" android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@+id/detail_item_date_text"/>
<ImageView
android:layout_width="16dp"
android:layout_height="16dp" app:srcCompat="@drawable/ic_priority_5_24dp"
android:id="@+id/detail_item_priority_image"
app:layout_constraintStart_toEndOf="@+id/detail_item_date_text"
app:layout_constraintTop_toTopOf="@+id/detail_item_date_text"
app:layout_constraintBottom_toBottomOf="@+id/detail_item_date_text" android:layout_marginStart="5dp"/>
2021-11-23 09:45:43 +13:00
</androidx.constraintlayout.widget.ConstraintLayout>