Account switcher M3 redesign
This commit is contained in:
9
mastodon/src/main/res/drawable/ic_logout_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_logout_24px.xml
Normal file
@@ -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:fillColor="@android:color/white"
|
||||
android:pathData="M5,21Q4.175,21 3.587,20.413Q3,19.825 3,19V5Q3,4.175 3.587,3.587Q4.175,3 5,3H12V5H5Q5,5 5,5Q5,5 5,5V19Q5,19 5,19Q5,19 5,19H12V21ZM16,17 L14.625,15.55 17.175,13H9V11H17.175L14.625,8.45L16,7L21,12Z"/>
|
||||
</vector>
|
||||
9
mastodon/src/main/res/drawable/ic_unfold_more_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_unfold_more_24px.xml
Normal file
@@ -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:fillColor="@android:color/white"
|
||||
android:pathData="M12,21 L7.5,16.5 8.95,15.05 12,18.1 15.05,15.05 16.5,16.5ZM8.95,9.05 L7.5,7.6 12,3.1 16.5,7.6 15.05,9.05 12,6Z"/>
|
||||
</vector>
|
||||
@@ -1,44 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:layout_height="72dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:importantForAccessibility="no"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/radiobtn_wrap"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="8dp">
|
||||
<RadioButton
|
||||
android:id="@+id/radiobtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"/>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="24dp"
|
||||
android:textSize="16dp"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_toEndOf="@id/avatar"
|
||||
android:layout_toStartOf="@id/radiobtn_wrap"
|
||||
android:textAppearance="@style/m3_body_large"
|
||||
android:textColor="?colorM3OnSurface"
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"/>
|
||||
|
||||
<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/radiobtn_wrap"
|
||||
android:textColor="?colorM3OnSurfaceVariant"
|
||||
android:textAppearance="@style/m3_body_medium"
|
||||
android:singleLine="true"
|
||||
android:gravity="center_vertical"
|
||||
android:ellipsize="end"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/current"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:background="@drawable/ic_fluent_checkmark_24_filled"
|
||||
android:backgroundTint="?android:textColorSecondary"
|
||||
android:contentDescription="@string/current_account"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/more"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_fluent_more_vertical_24_regular"
|
||||
android:tint="?android:textColorSecondary"
|
||||
android:contentDescription="@string/more_options"
|
||||
android:background="?android:selectableItemBackgroundBorderless"/>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
15
mastodon/src/main/res/layout/item_text_with_icon.xml
Normal file
15
mastodon/src/main/res/layout/item_text_with_icon.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="?colorM3OnSurface"
|
||||
android:textAppearance="@style/m3_body_large"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp"
|
||||
android:drawablePadding="24dp"
|
||||
android:drawableTint="?colorM3OnSurfaceVariant"
|
||||
tools:text="List Item"/>
|
||||
@@ -91,13 +91,15 @@
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@null"/>
|
||||
<View
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
<ImageView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="-20dp"
|
||||
android:backgroundTint="?android:colorPrimary"
|
||||
android:background="@drawable/ic_fluent_chevron_up_down_16_regular"/>
|
||||
android:layout_marginStart="24dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:scaleType="center"
|
||||
android:tint="?colorM3OnSurfaceVariant"
|
||||
android:src="@drawable/ic_unfold_more_24px"/>
|
||||
</FrameLayout>
|
||||
</org.joinmastodon.android.ui.views.TabBar>
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
<string name="notification_channel_audio_player">Audio playback</string>
|
||||
<string name="play">Play</string>
|
||||
<string name="pause">Pause</string>
|
||||
<string name="log_out">Sign out</string>
|
||||
<string name="log_out">Log out</string>
|
||||
<string name="add_account">Add account</string>
|
||||
<string name="search_hint">Search</string>
|
||||
<string name="hashtags">Hashtags</string>
|
||||
@@ -267,7 +267,7 @@
|
||||
<string name="settings_clear_cache">Clear media cache</string>
|
||||
<string name="settings_app_version">Mastodon for Android v%1$s (%2$d)</string>
|
||||
<string name="media_cache_cleared">Media cache cleared</string>
|
||||
<string name="confirm_log_out">Are you sure you want to sign out?</string>
|
||||
<string name="confirm_log_out">Log out of %s?</string>
|
||||
<string name="sensitive_content_explain">The author marked this media as sensitive.</string>
|
||||
<string name="media_hidden">Tap to reveal</string>
|
||||
<string name="avatar_description">Go to %s\'s profile</string>
|
||||
@@ -453,4 +453,6 @@
|
||||
<string name="welcome_paragraph2"><![CDATA[Every Mastodon account is hosted on a server — each with its own values, rules, & admins. No matter which one you pick, you can follow and interact with people on any server.]]></string>
|
||||
<string name="opening_link">Opening link…</string>
|
||||
<string name="link_not_supported">This link is not supported in the app</string>
|
||||
<string name="log_out_all_accounts">Log out of all accounts</string>
|
||||
<string name="confirm_log_out_all_accounts">Log out of all accounts?</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user