Add display item for unknown/file attachments
Co-authored-by: LucasGGamerM <lucassggabriel@gmail.com>
This commit is contained in:
11
mastodon/src/main/res/drawable/bg_search_button.xml
Normal file
11
mastodon/src/main/res/drawable/bg_search_button.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?android:attr/colorControlHighlight">
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="?colorSearchField"/>
|
||||
<corners android:radius="6dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
@@ -0,0 +1,9 @@
|
||||
<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="M11.772,3.744C14.114,1.4 17.913,1.4 20.256,3.744C22.539,6.027 22.597,9.692 20.431,12.046L20.243,12.243L11.443,21.041L11.407,21.072C9.945,22.388 7.691,22.344 6.284,20.936C4.965,19.617 4.843,17.555 5.918,16.098C5.941,16.052 5.969,16.009 6.002,15.968L6.056,15.908L6.143,15.82L6.284,15.672L6.287,15.675L13.723,8.221C13.989,7.954 14.405,7.93 14.699,8.147L14.783,8.22C15.05,8.485 15.075,8.902 14.857,9.196L14.785,9.28L7.19,16.893C6.473,17.769 6.522,19.063 7.34,19.881C8.169,20.71 9.488,20.749 10.364,19.999L19.197,11.168C20.952,9.411 20.952,6.562 19.195,4.804C17.493,3.102 14.766,3.049 12.999,4.645L12.831,4.804L12.819,4.819L3.282,14.355C2.989,14.648 2.515,14.648 2.222,14.355C1.955,14.089 1.931,13.672 2.149,13.378L2.222,13.294L11.771,3.744L11.772,3.744Z"
|
||||
android:fillColor="@color/fluent_default_icon_tint"/>
|
||||
</vector>
|
||||
59
mastodon/src/main/res/layout/display_item_file.xml
Normal file
59
mastodon/src/main/res/layout/display_item_file.xml
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<org.joinmastodon.android.ui.views.MaxWidthFrameLayout
|
||||
android:id="@+id/inner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:maxWidth="@dimen/layout_max_width">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginVertical="4dp"
|
||||
android:background="@drawable/bg_search_field"
|
||||
android:paddingVertical="12dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="18dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/ic_fluent_attach_24_regular" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/m3_body_large"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
tools:text="Link title"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/domain"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/m3_body_medium"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
tools:text="example.com"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</org.joinmastodon.android.ui.views.MaxWidthFrameLayout>
|
||||
</FrameLayout>
|
||||
@@ -274,4 +274,5 @@
|
||||
<string name="sk_settings_confirm_before_reblog">Vor dem Teilen bestätigen</string>
|
||||
<string name="sk_reacted">hat reagiert</string>
|
||||
<string name="sk_reacted_with">hat mit %s reagiert</string>
|
||||
<string name="sk_attachment">Anhang</string>
|
||||
</resources>
|
||||
@@ -286,4 +286,5 @@
|
||||
<string name="sk_settings_content_types_explanation">Allows setting a content type like Markdown when creating a post. Keep in mind that not all instances support this.</string>
|
||||
<string name="sk_settings_default_content_type">Default content type</string>
|
||||
<string name="sk_settings_default_content_type_explanation">This lets you have a content type be pre-selected when creating new posts, overriding the value set in “Posting preferences”.</string>
|
||||
<string name="sk_attachment">Attachment</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user