change background color of detailed status for better legibility, especially with light theme
This commit is contained in:
parent
f2f3be37b3
commit
3a7a663824
1 changed files with 94 additions and 95 deletions
|
@ -1,44 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/status_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:background="?attr/colorPrimaryDark">
|
||||
android:paddingRight="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/status_avatar"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:id="@+id/status_avatar"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:contentDescription="@string/action_view_profile"
|
||||
android:scaleType="fitCenter"
|
||||
tools:src="@drawable/avatar_default" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/status_name_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_toRightOf="@+id/status_avatar"
|
||||
android:layout_toEndOf="@+id/status_avatar"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_toEndOf="@+id/status_avatar"
|
||||
android:layout_toRightOf="@+id/status_avatar"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_display_name"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textStyle="normal|bold"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1" />
|
||||
android:textStyle="normal|bold" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
|
@ -49,42 +48,42 @@
|
|||
android:id="@+id/status_username"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end" />
|
||||
android:textColor="?android:textColorSecondary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.keylesspalace.tusky.view.FlowLayout
|
||||
android:id="@+id/status_content_warning_bar"
|
||||
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"
|
||||
app:paddingHorizontal="4dp"
|
||||
android:focusable="true">
|
||||
android:layout_toEndOf="@+id/status_avatar"
|
||||
android:layout_toRightOf="@+id/status_avatar"
|
||||
android:focusable="true"
|
||||
android:visibility="gone"
|
||||
app:paddingHorizontal="4dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_content_warning_description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/status_content_warning_description"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" />
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/status_content_warning_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="0dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
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:minWidth="0dp"
|
||||
android:padding="3dp"
|
||||
android:textAllCaps="true"
|
||||
android:background="?attr/content_warning_button" />
|
||||
android:textOff="@string/status_content_warning_show_more"
|
||||
android:textOn="@string/status_content_warning_show_less" />
|
||||
|
||||
</com.keylesspalace.tusky.view.FlowLayout>
|
||||
|
||||
|
@ -92,15 +91,15 @@
|
|||
android:id="@+id/status_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
|
||||
android:layout_marginBottom="4dp"
|
||||
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" />
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_toEndOf="@+id/status_avatar"
|
||||
android:layout_toRightOf="@+id/status_avatar"
|
||||
android:focusable="true"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/status_media_preview_container"
|
||||
|
@ -111,65 +110,65 @@
|
|||
android:layout_toRightOf="@+id/status_avatar">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_height="wrap_content">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<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" />
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/action_view_media"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<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_marginStart="2dp"
|
||||
android:layout_marginTop="@dimen/status_media_preview_top_margin"
|
||||
android:contentDescription="@string/action_view_media" />
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/action_view_media"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_height="wrap_content">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<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" />
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/action_view_media"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<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_marginStart="2dp"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="centerCrop"
|
||||
android:contentDescription="@string/action_view_media" />
|
||||
android:contentDescription="@string/action_view_media"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -180,25 +179,25 @@
|
|||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/status_video_indicator"
|
||||
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:alpha="0.5"
|
||||
android:contentDescription="@null"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/ic_play_48dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/status_sensitive_media_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/status_sensitive_media_button"
|
||||
app:srcCompat="@drawable/ic_remove_red_eye_black_24dp"
|
||||
android:alpha="0.7"
|
||||
android:layout_alignParentTop="true"
|
||||
android:alpha="0.7"
|
||||
android:contentDescription="@null"
|
||||
android:padding="@dimen/status_sensitive_media_button_padding"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/ic_remove_red_eye_black_24dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -206,36 +205,36 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/status_media_preview_top_margin"
|
||||
android:padding="8dp"
|
||||
android:background="?attr/sensitive_media_warning_background_color"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:background="?attr/sensitive_media_warning_background_color"
|
||||
android:padding="8dp"
|
||||
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:textAlignment="center"
|
||||
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:textAlignment="center"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_media_label"
|
||||
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" />
|
||||
android:includeFontPadding="false"
|
||||
android:visibility="gone" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
@ -244,10 +243,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/status_media_preview_container"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_toEndOf="@id/status_avatar"
|
||||
android:layout_toRightOf="@id/status_avatar"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
|
@ -260,13 +259,12 @@
|
|||
android:id="@+id/status_application"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginLeft="16dp" />
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginStart="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/status_info_bar"
|
||||
|
@ -275,16 +273,17 @@
|
|||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="2dp">
|
||||
|
||||
<ImageButton
|
||||
app:srcCompat="@drawable/ic_reply_24dp"
|
||||
android:id="@+id/status_reply"
|
||||
style="?attr/image_button_style"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:contentDescription="@string/action_reply"
|
||||
android:padding="4dp"
|
||||
style="?attr/image_button_style"
|
||||
android:contentDescription="@string/action_reply" />
|
||||
app:srcCompat="@drawable/ic_reply_24dp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
|
@ -293,16 +292,16 @@
|
|||
|
||||
<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"
|
||||
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:clipToPadding="false"
|
||||
android:contentDescription="@string/action_reblog"
|
||||
android:clipToPadding="false"/>
|
||||
android:padding="4dp"
|
||||
app:sparkbutton_activeImage="@drawable/reblog_active"
|
||||
app:sparkbutton_iconSize="28dp"
|
||||
app:sparkbutton_inActiveImage="?attr/status_reblog_inactive_drawable"
|
||||
app:sparkbutton_primaryColor="@color/status_reblog_button_marked_dark"
|
||||
app:sparkbutton_secondaryColor="@color/status_reblog_button_marked_light" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_reblogs"
|
||||
|
@ -315,17 +314,17 @@
|
|||
android:layout_weight="1" />
|
||||
|
||||
<com.varunest.sparkbutton.SparkButton
|
||||
android:id="@+id/status_favourite"
|
||||
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"
|
||||
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:clipToPadding="false"
|
||||
android:contentDescription="@string/action_favourite"
|
||||
android:clipToPadding="false"/>
|
||||
android:padding="4dp"
|
||||
app:sparkbutton_activeImage="?attr/status_favourite_active_drawable"
|
||||
app:sparkbutton_iconSize="28dp"
|
||||
app:sparkbutton_inActiveImage="?attr/status_favourite_inactive_drawable"
|
||||
app:sparkbutton_primaryColor="@color/status_favourite_button_marked_dark"
|
||||
app:sparkbutton_secondaryColor="@color/status_favourite_button_marked_light" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_favourites"
|
||||
|
@ -338,13 +337,13 @@
|
|||
android:layout_weight="1" />
|
||||
|
||||
<ImageButton
|
||||
app:srcCompat="@drawable/ic_more_horiz_24dp"
|
||||
android:id="@+id/status_more"
|
||||
style="?attr/image_button_style"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:contentDescription="@string/action_more"
|
||||
android:padding="4dp"
|
||||
style="?attr/image_button_style"
|
||||
android:contentDescription="@string/action_more" />
|
||||
app:srcCompat="@drawable/ic_more_horiz_24dp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
|
|
Loading…
Reference in a new issue