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

365 lines
15 KiB
XML
Raw Normal View History

2017-01-03 10:30:27 +11:00
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:id="@+id/status_container">
2017-01-03 10:30:27 +11:00
<RelativeLayout
android:layout_width="match_parent"
2017-01-03 10:30:27 +11:00
android:layout_height="wrap_content"
android:id="@+id/status_reblogged_bar"
2017-01-03 10:30:27 +11:00
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="@dimen/status_reblogged_bar_top_padding">
2017-01-03 10:30:27 +11:00
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_repeat_24dp"
android:id="@+id/status_reblogged_icon"
android:paddingStart="24dp"
android:paddingLeft="24dp"
android:paddingEnd="10dp"
android:paddingRight="10dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:tint="?android:textColorTertiary"
android:contentDescription="@null" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/status_reblogged"
android:textColor="?android:textColorTertiary"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/status_reblogged_icon"
android:layout_toRightOf="@id/status_reblogged_icon" />
</RelativeLayout>
2017-01-03 10:30:27 +11:00
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="fitCenter"
2017-01-03 10:30:27 +11:00
android:id="@+id/status_avatar"
android:layout_below="@+id/status_reblogged_bar"
2017-03-14 02:19:34 +11:00
android:layout_marginTop="11dp"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:contentDescription="@string/action_view_profile" />
2017-01-03 10:30:27 +11:00
<RelativeLayout
2017-01-03 10:30:27 +11:00
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/status_avatar"
android:layout_toEndOf="@+id/status_avatar"
android:id="@+id/status_name_bar"
android:layout_below="@+id/status_reblogged_bar"
android:layout_width="match_parent"
android:paddingBottom="4dp"
android:paddingTop="@dimen/status_avatar_padding">
2017-01-03 10:30:27 +11:00
<TextView
android:id="@+id/status_since_created"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:text="20m"
android:textColor="?android:textColorSecondary" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_toStartOf="@id/status_since_created"
android:layout_toLeftOf="@id/status_since_created">
<TextView
android:id="@+id/status_display_name"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"
android:textColor="?android:textColorPrimary"
android:textStyle="normal|bold"
android:ellipsize="end"
android:maxLines="1"
android:text="Name"
android:paddingStart="0dp"
android:paddingLeft="0dp"
android:paddingEnd="@dimen/status_display_name_right_padding"
android:paddingRight="@dimen/status_display_name_right_padding" />
2017-01-03 10:30:27 +11:00
<TextView
android:id="@+id/status_username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:textColorSecondary"
android:maxLines="1"
android:ellipsize="end"
android:text="Username is the slongest thing ever i am totally going" />
2017-01-03 10:30:27 +11:00
</LinearLayout>
</RelativeLayout>
2017-01-03 10:30:27 +11:00
2017-05-15 20:07:01 +10:00
<com.keylesspalace.tusky.view.FlowLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/status_content_warning_bar"
android:visibility="gone"
android:layout_toRightOf="@+id/status_avatar"
android:layout_toEndOf="@+id/status_avatar"
android:layout_below="@+id/status_name_bar"
android:layout_marginBottom="4dp"
android:focusable="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/status_content_warning_description"
android:text="Hello world"
android:textColor="?android:textColorPrimary"
android:paddingStart="0dp"
android:paddingLeft="0dp"
android:paddingEnd="8dp"
android:paddingRight="8dp" />
<ToggleButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="0dp"
android:minHeight="0dp"
android:id="@+id/status_content_warning_button"
android:textOn="@string/status_content_warning_show_less"
android:textOff="@string/status_content_warning_show_more"
android:padding="3dp"
android:textSize="12sp"
android:textAllCaps="true"
android:background="?attr/content_warning_button" />
2017-05-15 20:07:01 +10:00
</com.keylesspalace.tusky.view.FlowLayout>
2017-01-03 10:30:27 +11:00
<TextView
android:id="@+id/status_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:textColorPrimary"
android:layout_marginBottom="4dp"
2017-01-03 10:30:27 +11:00
android:layout_toRightOf="@+id/status_avatar"
android:layout_toEndOf="@+id/status_avatar"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/status_content_warning_bar"
android:focusable="true" />
2017-01-03 10:30:27 +11:00
<FrameLayout
android:id="@+id/status_media_preview_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/status_content"
android:layout_toEndOf="@+id/status_avatar"
android:layout_toRightOf="@+id/status_avatar">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_marginBottom="2dp"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/status_media_preview_0"
android:layout_width="wrap_content"
android:layout_height="@dimen/status_media_preview_height"
android:layout_weight="1"
android:layout_marginEnd="2dp"
android:layout_marginRight="2dp"
android:scaleType="centerCrop"
android:layout_marginTop="@dimen/status_media_preview_top_margin"
android:contentDescription="@string/action_view_media" />
<ImageView
android:id="@+id/status_media_preview_1"
android:layout_width="wrap_content"
android:layout_height="@dimen/status_media_preview_height"
android:layout_weight="1"
android:layout_marginStart="2dp"
android:layout_marginLeft="2dp"
android:scaleType="centerCrop"
android:layout_marginTop="@dimen/status_media_preview_top_margin"
android:contentDescription="@string/action_view_media" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_marginTop="2dp"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/status_media_preview_2"
android:layout_width="wrap_content"
android:layout_height="@dimen/status_media_preview_height"
android:layout_weight="1"
android:layout_marginEnd="2dp"
android:layout_marginRight="2dp"
android:scaleType="centerCrop"
android:contentDescription="@string/action_view_media" />
<ImageView
android:id="@+id/status_media_preview_3"
android:layout_width="wrap_content"
android:layout_height="@dimen/status_media_preview_height"
android:layout_marginStart="2dp"
android:layout_marginLeft="2dp"
android:layout_weight="1"
android:scaleType="centerCrop"
android:contentDescription="@string/action_view_media" />
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/status_video_indicator"
app:srcCompat="@drawable/ic_play_48dp"
android:alpha="0.5"
android:layout_centerInParent="true"
android:contentDescription="@null"
android:visibility="gone" />
</RelativeLayout>
<LinearLayout
android:id="@+id/status_sensitive_media_warning"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/status_media_preview_top_margin"
android:padding="8dp"
android:gravity="center"
android:orientation="vertical"
android:background="?attr/sensitive_media_warning_background_color"
android:visibility="gone">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:text="@string/status_sensitive_media_title"
android:textColor="@android:color/white"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:text="@string/status_sensitive_media_directions"
android:textColor="@android:color/white" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/status_media_label"
android:visibility="gone"
android:gravity="center_vertical"
android:includeFontPadding="false" />
</FrameLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/status_media_preview_container"
android:layout_toEndOf="@+id/status_avatar"
android:layout_toRightOf="@+id/status_avatar"
android:clipChildren="false"
android:clipToPadding="false"
android:paddingBottom="2dp">
<ImageButton
app:srcCompat="@drawable/ic_reply_24dp"
android:id="@+id/status_reply"
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="4dp"
style="?attr/image_button_style"
android:contentDescription="@string/action_reply" />
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<com.varunest.sparkbutton.SparkButton
android:id="@+id/status_reblog"
app:sparkbutton_activeImage="@drawable/reblog_active"
app:sparkbutton_inActiveImage="?attr/status_reblog_inactive_drawable"
app:sparkbutton_iconSize="28dp"
android:layout_gravity="center"
app:sparkbutton_primaryColor="@color/status_reblog_button_marked_dark"
app:sparkbutton_secondaryColor="@color/status_reblog_button_marked_light"
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="4dp"
android:contentDescription="@string/action_reblog" />
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<com.varunest.sparkbutton.SparkButton
android:layout_width="40dp"
android:layout_height="40dp"
app:sparkbutton_activeImage="?attr/status_favourite_active_drawable"
app:sparkbutton_inActiveImage="?attr/status_favourite_inactive_drawable"
app:sparkbutton_iconSize="28dp"
android:layout_gravity="center"
app:sparkbutton_primaryColor="@color/status_favourite_button_marked_dark"
app:sparkbutton_secondaryColor="@color/status_favourite_button_marked_light"
android:id="@+id/status_favourite"
android:padding="4dp"
android:contentDescription="@string/action_favourite" />
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<ImageButton
app:srcCompat="@drawable/ic_more_horiz_24dp"
android:id="@+id/status_more"
android:layout_width="32dp"
android:layout_height="32dp"
android:padding="4dp"
style="?attr/image_button_style"
android:contentDescription="@string/action_more" />
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
2017-01-03 10:30:27 +11:00
</RelativeLayout>