Improve follow recommendations screen (AND-101)
This commit is contained in:
9
mastodon/src/main/res/drawable/bg_button_m3_elevated.xml
Normal file
9
mastodon/src/main/res/drawable/bg_button_m3_elevated.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple android:color="@color/m3_primary_overlay" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:tint="@color/m3_primary_alpha5" android:tintMode="src_over">
|
||||
<solid android:color="?colorM3Surface"/>
|
||||
<corners android:radius="20dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
5
mastodon/src/main/res/drawable/fg_onboarding_ava.xml
Normal file
5
mastodon/src/main/res/drawable/fg_onboarding_ava.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<stroke android:width="1dp" android:color="?colorM3OutlineVariant"/>
|
||||
<corners android:radius="7dp"/>
|
||||
</shape>
|
||||
@@ -37,16 +37,16 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:background="@drawable/bg_onboarding_panel">
|
||||
android:background="@drawable/bg_m3_surface1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
style="@style/Widget.Mastodon.M3.Button.Tonal"
|
||||
style="@style/Widget.Mastodon.M3.Button.Elevated"
|
||||
android:text="@string/follow_all"/>
|
||||
|
||||
<Button
|
||||
@@ -55,10 +55,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
style="@style/Widget.Mastodon.M3.Button.Filled"
|
||||
android:text="@string/skip"/>
|
||||
android:text="@string/next"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
123
mastodon/src/main/res/layout/item_account_list_onboarding.xml
Normal file
123
mastodon/src/main/res/layout/item_account_list_onboarding.xml
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.joinmastodon.android.ui.views.CheckableRelativeLayout 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"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:foreground="@drawable/fg_onboarding_ava"
|
||||
android:padding="1dp"
|
||||
tools:src="#0f0"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_toEndOf="@id/avatar"
|
||||
android:layout_toStartOf="@id/accessory"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:textAppearance="@style/m3_title_small"
|
||||
android:textColor="?colorM3OnSurface"
|
||||
tools:text="User"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_below="@id/name"
|
||||
android:layout_toEndOf="@id/avatar"
|
||||
android:layout_toStartOf="@id/accessory"
|
||||
android:layout_marginTop="-2dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical|start"
|
||||
android:textAppearance="@style/m3_body_medium"
|
||||
android:textColor="?colorM3Secondary"
|
||||
android:textAlignment="viewStart"
|
||||
tools:text="\@user@server"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/accessory"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="38dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginStart="8dp"
|
||||
android:duplicateParentState="true">
|
||||
|
||||
<org.joinmastodon.android.ui.views.ProgressBarButton
|
||||
android:id="@+id/button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:minWidth="96dp"
|
||||
android:maxWidth="150dp"
|
||||
style="@style/Widget.Mastodon.M3.Button.Filled"
|
||||
tools:text="Follow back"/>
|
||||
<ProgressBar
|
||||
android:id="@+id/action_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true"
|
||||
style="?android:progressBarStyleSmall"
|
||||
android:elevation="10dp"
|
||||
android:outlineProvider="none"
|
||||
android:indeterminateTint="?colorM3OnPrimary"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginHorizontal="4dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:duplicateParentState="true"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/options_btn"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="top"
|
||||
android:background="?android:actionBarItemBackground"
|
||||
android:tint="?colorM3OnSurfaceVariant"
|
||||
android:contentDescription="@string/more_options"
|
||||
android:src="@drawable/ic_more_vert_24px"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/avatar"
|
||||
android:layout_below="@id/username"
|
||||
android:layout_marginTop="2dp"
|
||||
android:textAppearance="@style/m3_body_medium"
|
||||
android:textColor="?colorM3OnSurface"
|
||||
android:maxLines="2"
|
||||
android:paddingVertical="2dp"
|
||||
tools:text="bla bla bla bla bla bla"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/menu_anchor"
|
||||
android:layout_width="1px"
|
||||
android:layout_height="1px"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="-16dp"/>
|
||||
|
||||
</org.joinmastodon.android.ui.views.CheckableRelativeLayout>
|
||||
@@ -350,7 +350,6 @@
|
||||
<string name="profile_add_row">Add row</string>
|
||||
<string name="profile_setup">Profile setup</string>
|
||||
<string name="profile_setup_subtitle">You can always complete this later in the Profile tab.</string>
|
||||
<string name="popular_on_mastodon">Popular on Mastodon</string>
|
||||
<string name="follow_all">Follow all</string>
|
||||
<string name="server_rules_disagree">Disagree</string>
|
||||
<string name="privacy_policy_explanation">TL;DR: We don’t collect or process anything.</string>
|
||||
@@ -664,4 +663,6 @@
|
||||
<string name="discoverability">Discoverability</string>
|
||||
<string name="discoverability_help">When you opt into discoverability on Mastodon, your posts may appear in search results and trending.\n\nYour profile may be suggested to people with similar interests to you.\n\nOpting out does not hide your profile if someone searches for you by name.</string>
|
||||
<string name="app_version_copied">Version number copied to clipboard</string>
|
||||
<string name="onboarding_recommendations_intro">You curate your own home feed.
The more people you follow, the more active and interesting it will be.</string>
|
||||
<string name="onboarding_recommendations_title">Personalize your home feed</string>
|
||||
</resources>
|
||||
@@ -289,6 +289,14 @@
|
||||
<item name="android:textColor">@color/button_text_m3_tonal_error</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Mastodon.M3.Button.Elevated">
|
||||
<item name="android:background">@drawable/bg_button_m3_elevated</item>
|
||||
<item name="android:textColor">@color/button_text_m3_text</item>
|
||||
<item name="android:paddingLeft">24dp</item>
|
||||
<item name="android:paddingRight">24dp</item>
|
||||
<item name="android:elevation">1dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Mastodon.M3.Button.Outlined">
|
||||
<item name="android:background">@drawable/bg_button_m3_outlined</item>
|
||||
<item name="android:textColor">@color/button_text_m3_text</item>
|
||||
|
||||
Reference in New Issue
Block a user