Add info banners in discover sub-tabs

This commit is contained in:
Grishka
2022-04-25 22:27:18 +03:00
parent 3c9670bbaa
commit 89c7a13c59
8 changed files with 143 additions and 11 deletions

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/discover_info_banner"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:elevation="1dp"
android:outlineProvider="background"
android:background="?colorWindowBackground">
<TextView
android:id="@+id/banner_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:textAppearance="@style/m3_body_large"
tools:text="@string/trending_posts_info_banner"/>
<ImageButton
android:id="@+id/banner_dismiss"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_margin="8dp"
android:src="@drawable/ic_fluent_dismiss_circle_24_filled"
android:tint="?android:textColorSecondary"
android:contentDescription="@string/dismiss"
android:background="?android:selectableItemBackgroundBorderless"/>
</LinearLayout>

View File

@@ -307,5 +307,9 @@
<string name="downloading">Downloading…</string>
<string name="no_app_to_handle_action">There\'s no app to handle this action</string>
<string name="local_timeline">Community</string>
<string name="trending_posts">Trending</string>
<string name="trending_posts_info_banner">These are the posts gaining traction in your corner of Mastodon.</string>
<string name="trending_hashtags_info_banner">These are the hashtags gaining traction in your corner of Mastodon.</string>
<string name="trending_links_info_banner">These are the news stories being shared the most in your corner of Mastodon.</string>
<string name="local_timeline_info_banner">These are the most recent posts by the people who use the same Mastodon server as you.</string>
<string name="dismiss">Dismiss</string>
</resources>