Add bot indicator overlay to avatars (#1173)
* Add bot indicator overlay to avatars * Add bot overlay to account list in search view * Add preference for bot avatar overlay
This commit is contained in:
parent
63e4c1d4e0
commit
391cd12974
13 changed files with 115 additions and 34 deletions
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/account_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
|
|
@ -12,14 +13,31 @@
|
|||
android:id="@+id/account_avatar"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="24dp" />
|
||||
android:foregroundGravity="center_vertical"
|
||||
android:layout_marginEnd="24dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<com.keylesspalace.tusky.view.RoundedImageView
|
||||
android:id="@+id/account_avatar_inset"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@null"
|
||||
android:importantForAccessibility="no"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/account_avatar"
|
||||
app:layout_constraintEnd_toEndOf="@id/account_avatar"
|
||||
tools:src="@color/accent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_toEndOf="@id/account_avatar"
|
||||
app:layout_constraintStart_toEndOf="@id/account_avatar"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginStart="14dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
|
|
@ -45,4 +63,4 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
tools:src="@drawable/avatar_default" />
|
||||
|
||||
<com.keylesspalace.tusky.view.RoundedImageView
|
||||
android:id="@+id/status_avatar_reblog"
|
||||
android:id="@+id/status_avatar_inset"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@null"
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
tools:src="@drawable/avatar_default" />
|
||||
|
||||
<com.keylesspalace.tusky.view.RoundedImageView
|
||||
android:id="@+id/status_avatar_reblog"
|
||||
android:id="@+id/status_avatar_inset"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@null"
|
||||
|
|
@ -338,14 +338,14 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_reblog"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_inset"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="@id/status_display_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_media_preview_container"
|
||||
app:srcCompat="@drawable/ic_reply_24dp" />
|
||||
|
||||
<at.connyduck.sparkbutton.SparkButton
|
||||
android:id="@+id/status_reblog"
|
||||
android:id="@+id/status_inset"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:clipToPadding="false"
|
||||
|
|
@ -370,8 +370,8 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_more"
|
||||
app:layout_constraintStart_toEndOf="@id/status_reblog"
|
||||
app:layout_constraintTop_toTopOf="@id/status_reblog"
|
||||
app:layout_constraintStart_toEndOf="@id/status_inset"
|
||||
app:layout_constraintTop_toTopOf="@id/status_inset"
|
||||
sparkbutton:activeImage="?attr/status_favourite_active_drawable"
|
||||
sparkbutton:iconSize="28dp"
|
||||
sparkbutton:inactiveImage="?attr/status_favourite_inactive_drawable"
|
||||
|
|
|
|||
|
|
@ -24,6 +24,18 @@
|
|||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/avatar_default" />
|
||||
|
||||
<com.keylesspalace.tusky.view.RoundedImageView
|
||||
android:id="@+id/status_avatar_inset"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@null"
|
||||
android:importantForAccessibility="no"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/status_avatar"
|
||||
app:layout_constraintEnd_toEndOf="@id/status_avatar"
|
||||
tools:src="@color/accent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
android:id="@+id/status_display_name"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -408,14 +420,14 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_reblog"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_inset"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_buttons_divider"
|
||||
app:srcCompat="@drawable/ic_reply_24dp" />
|
||||
|
||||
<at.connyduck.sparkbutton.SparkButton
|
||||
android:id="@+id/status_reblog"
|
||||
android:id="@+id/status_inset"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:clipToPadding="false"
|
||||
|
|
@ -440,8 +452,8 @@
|
|||
android:importantForAccessibility="no"
|
||||
android:padding="4dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/status_more"
|
||||
app:layout_constraintStart_toEndOf="@id/status_reblog"
|
||||
app:layout_constraintTop_toTopOf="@id/status_reblog"
|
||||
app:layout_constraintStart_toEndOf="@id/status_inset"
|
||||
app:layout_constraintTop_toTopOf="@id/status_inset"
|
||||
sparkbutton:activeImage="?attr/status_favourite_active_drawable"
|
||||
sparkbutton:iconSize="28dp"
|
||||
sparkbutton:inactiveImage="?attr/status_favourite_inactive_drawable"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue