mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-27 12:00:03 +03:00
New rendering for redacted message
This commit is contained in:
parent
adac80062c
commit
05d1e64cb5
6 changed files with 96 additions and 12 deletions
41
vector/src/main/res/drawable/ic_trash_16.xml
Normal file
41
vector/src/main/res/drawable/ic_trash_16.xml
Normal file
|
@ -0,0 +1,41 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="16dp"
|
||||
android:height="16dp"
|
||||
android:viewportWidth="16"
|
||||
android:viewportHeight="16">
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M1.5,3.6667H3.4444H14.5"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#2E2F32"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M11,3.6667L10,0.6667H6L5,3.6667"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#2E2F32"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M3.5,6.1667V13.8334C3.5,14.5697 4.097,15.1667 4.8333,15.1667H11.1667C11.903,15.1667 12.5,14.5697 12.5,13.8334V6.1667"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#2E2F32"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M6.5,6.1667V12.1667"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#2E2F32"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M9.5,6.1667V12.1667"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#2E2F32"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
41
vector/src/main/res/drawable/ic_trash_24.xml
Normal file
41
vector/src/main/res/drawable/ic_trash_24.xml
Normal file
|
@ -0,0 +1,41 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M2.25,5.5H5.1667H21.75"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#2E2F32"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M16.5,5.5L15,1H9L7.5,5.5"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#2E2F32"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M5.25,9.25V20.75C5.25,21.8546 6.1454,22.75 7.25,22.75H16.75C17.8546,22.75 18.75,21.8546 18.75,20.75V9.25"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#2E2F32"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M9.75,9.25V18.25"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#2E2F32"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M14.25,9.25V18.25"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#2E2F32"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="10dp" />
|
||||
<solid android:color="?vctr_redacted_message_color" />
|
||||
</shape>
|
|
@ -66,16 +66,15 @@
|
|||
android:id="@+id/decorationSpace"
|
||||
android:layout_width="4dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_toEndOf="@id/messageStartGuideline"
|
||||
/>
|
||||
android:layout_toEndOf="@id/messageStartGuideline" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/messageE2EDecoration"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_alignTop="@id/viewStubContainer"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_alignEnd="@id/decorationSpace"
|
||||
android:layout_marginTop="7dp"
|
||||
android:visibility="gone"
|
||||
tools:src="@drawable/ic_shield_warning"
|
||||
tools:visibility="visible" />
|
||||
|
@ -119,7 +118,7 @@
|
|||
<ViewStub
|
||||
android:id="@+id/messageContentRedactedStub"
|
||||
style="@style/TimelineContentStubBaseParams"
|
||||
android:layout_height="20dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="56dp"
|
||||
android:layout="@layout/item_timeline_event_redacted_stub" />
|
||||
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
<View xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<TextView 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="20dp"
|
||||
android:background="@drawable/redacted_background" />
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/ic_trash_16"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/event_redacted"
|
||||
android:textColor="?riotx_text_primary_body_contrast"
|
||||
android:textSize="14sp"
|
||||
app:drawableTint="?riotx_text_primary_body_contrast" />
|
|
@ -1563,6 +1563,7 @@ Why choose Riot.im?
|
|||
<string name="message_view_reaction">View Reactions</string>
|
||||
<string name="reactions">Reactions</string>
|
||||
|
||||
<string name="event_redacted">Message deleted</string>
|
||||
<string name="event_redacted_by_user_reason">Event deleted by user</string>
|
||||
<string name="event_redacted_by_admin_reason">Event moderated by room admin</string>
|
||||
<string name="last_edited_info_message">Last edited by %1$s on %2$s</string>
|
||||
|
|
Loading…
Reference in a new issue