chinwag-android/app/src/main/res/layout/item_status_notification.xml

122 lines
4.8 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?><!--This applies only to favourite and reblog notifications.-->
<RelativeLayout 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:id="@+id/notification_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<RelativeLayout
android:id="@+id/notification_top_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp">
<ImageView
android:id="@+id/notification_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@null"
android:paddingEnd="10dp"
android:paddingLeft="24dp"
android:paddingRight="10dp"
android:paddingStart="24dp"
app:srcCompat="@drawable/ic_repeat_24dp" />
<TextView
android:id="@+id/notification_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/notification_icon"
android:layout_toRightOf="@id/notification_icon"
2017-03-08 06:42:01 +11:00
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:textColorSecondary"
tools:text="Someone favourited your status" />
</RelativeLayout>
2017-11-08 07:31:44 +11:00
<com.keylesspalace.tusky.view.FlowLayout
android:id="@+id/notification_content_warning_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/notification_top_bar"
android:layout_marginBottom="4dp"
android:layout_toEndOf="@+id/notification_status_avatar"
android:layout_toRightOf="@+id/notification_status_avatar"
android:focusable="true"
android:visibility="gone"
app:paddingHorizontal="4dp"
tools:visibility="visible">
<TextView
android:id="@+id/notification_content_warning_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:textColorTertiary"
tools:text="Example CW text"/>
<ToggleButton
android:id="@+id/notification_content_warning_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp"
android:background="?attr/content_warning_button"
android:minHeight="0dp"
android:minWidth="0dp"
android:paddingBottom="3dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingTop="3dp"
android:textAllCaps="true"
android:textOff="@string/status_content_warning_show_more"
android:textOn="@string/status_content_warning_show_less"
android:textSize="12sp" />
</com.keylesspalace.tusky.view.FlowLayout>
<TextView
android:id="@+id/notification_content"
2017-03-08 06:42:01 +11:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2017-11-08 07:31:44 +11:00
android:layout_below="@id/notification_content_warning_bar"
android:paddingBottom="10dp"
android:paddingEnd="0dp"
android:paddingLeft="58dp"
android:paddingRight="0dp"
android:paddingStart="58dp"
android:textColor="?android:textColorTertiary"
tools:text="Example status here" />
<ImageView
android:id="@+id/notification_status_avatar"
android:layout_width="48dp"
android:layout_height="48dp"
2017-11-08 07:31:44 +11:00
android:layout_below="@id/notification_top_bar"
android:layout_marginBottom="8dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="11dp"
android:contentDescription="@string/action_view_profile"
android:paddingBottom="12dp"
android:paddingRight="12dp"
android:scaleType="fitCenter"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:src="@drawable/avatar_default" />
<ImageView
android:id="@+id/notification_notification_avatar"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignBottom="@+id/notification_status_avatar"
android:layout_alignEnd="@id/notification_status_avatar"
android:layout_alignRight="@id/notification_status_avatar"
android:visibility="gone"
tools:src="@color/accent"
tools:visibility="visible" />
</RelativeLayout>