Material Design 3 (#4637)

I tried to find a balance between going fully M3 and keeping some of the
original Tusky feeling.
For example, I removed the "allCaps" setting we had on most buttons,
which is recommended for M3. On the other hand, I made them less rounded
than the M3 default.

<img
src="https://github.com/user-attachments/assets/9d2485e0-7d1d-42ab-8a4e-c30d044aa5dc"
width="320"/>
<img
src="https://github.com/user-attachments/assets/d65d3c91-afe9-424e-92d7-e0f3e401ea4b"
width="320"/>
<img
src="https://github.com/user-attachments/assets/d5634440-c507-4484-a11e-983f47cbeab7"
width="320"/>
This commit is contained in:
Konrad Pozniak 2024-09-10 19:50:09 +02:00 committed by GitHub
commit 50ca44a5f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
94 changed files with 575 additions and 487 deletions

View file

@ -8,12 +8,12 @@ import android.view.View
import android.view.accessibility.AccessibilityEvent
import android.view.accessibility.AccessibilityManager
import android.widget.ArrayAdapter
import androidx.appcompat.app.AlertDialog
import androidx.core.view.AccessibilityDelegateCompat
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat.AccessibilityActionCompat
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.keylesspalace.tusky.R
import com.keylesspalace.tusky.adapter.StatusBaseViewHolder
import com.keylesspalace.tusky.entity.Status.Companion.MAX_MEDIA_ATTACHMENTS
@ -174,7 +174,7 @@ class ListStatusAccessibilityDelegate(
val status = getStatus(host) as? StatusViewData.Concrete ?: return
val links = getLinks(status).toList()
val textLinks = links.map { item -> item.link }
AlertDialog.Builder(host.context)
MaterialAlertDialogBuilder(host.context)
.setTitle(R.string.title_links_dialog)
.setAdapter(
ArrayAdapter(
@ -191,7 +191,7 @@ class ListStatusAccessibilityDelegate(
val status = getStatus(host) as? StatusViewData.Concrete ?: return
val mentions = status.actionable.mentions
val stringMentions = mentions.map { it.username }
AlertDialog.Builder(host.context)
MaterialAlertDialogBuilder(host.context)
.setTitle(R.string.title_mentions_dialog)
.setAdapter(
ArrayAdapter<CharSequence>(
@ -209,7 +209,7 @@ class ListStatusAccessibilityDelegate(
private fun showHashtagsDialog(host: View) {
val status = getStatus(host) as? StatusViewData.Concrete ?: return
val tags = getHashtags(status).map { it.subSequence(1, it.length) }.toList()
AlertDialog.Builder(host.context)
MaterialAlertDialogBuilder(host.context)
.setTitle(R.string.title_hashtags_dialog)
.setAdapter(
ArrayAdapter(