diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt
index 0c3f82be06..3cb7357a77 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt
@@ -3,7 +3,6 @@ package eu.kanade.tachiyomi.ui.manga.info
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
-import androidx.core.content.ContextCompat
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.load.engine.DiskCacheStrategy
@@ -21,7 +20,6 @@ import eu.kanade.tachiyomi.source.online.HttpSource
import eu.kanade.tachiyomi.ui.manga.MangaController
import eu.kanade.tachiyomi.util.system.copyToClipboard
import eu.kanade.tachiyomi.util.view.setChips
-import eu.kanade.tachiyomi.util.view.setTooltip
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -103,27 +101,17 @@ class MangaInfoHeaderAdapter(
isVisible = true
if (trackCount > 0) {
- setCompoundDrawablesWithIntrinsicBounds(
- null,
- ContextCompat.getDrawable(context, R.drawable.ic_done_24dp),
- null,
- null
- )
+ setIconResource(R.drawable.ic_done_24dp)
text = view.context.resources.getQuantityString(
R.plurals.num_trackers,
trackCount,
trackCount
)
- isSelected = true
+ isActivated = true
} else {
- setCompoundDrawablesWithIntrinsicBounds(
- null,
- ContextCompat.getDrawable(context, R.drawable.ic_sync_24dp),
- null,
- null
- )
+ setIconResource(R.drawable.ic_sync_24dp)
text = view.context.getString(R.string.manga_tracking_tab)
- isSelected = false
+ isActivated = false
}
clicks()
@@ -139,7 +127,6 @@ class MangaInfoHeaderAdapter(
binding.btnWebview.clicks()
.onEach { controller.openMangaInWebView() }
.launchIn(scope)
- binding.btnWebview.setTooltip(R.string.action_open_in_web_view)
}
binding.mangaFullTitle.longClicks()
@@ -352,18 +339,10 @@ class MangaInfoHeaderAdapter(
// Set the Favorite drawable to the correct one.
// Border drawable if false, filled drawable if true.
binding.btnFavorite.apply {
- setCompoundDrawablesWithIntrinsicBounds(
- null,
- ContextCompat.getDrawable(
- context,
- if (isFavorite) R.drawable.ic_favorite_24dp else R.drawable.ic_favorite_border_24dp
- ),
- null,
- null
- )
+ setIconResource(if (isFavorite) R.drawable.ic_favorite_24dp else R.drawable.ic_favorite_border_24dp)
text =
context.getString(if (isFavorite) R.string.in_library else R.string.add_to_library)
- isSelected = isFavorite
+ isActivated = isFavorite
}
}
}
diff --git a/app/src/main/res/color/button_action_selector.xml b/app/src/main/res/color/button_action_selector.xml
new file mode 100644
index 0000000000..e457c5a524
--- /dev/null
+++ b/app/src/main/res/color/button_action_selector.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/app/src/main/res/color/outlined_button_bg.xml b/app/src/main/res/color/outlined_button_bg.xml
deleted file mode 100644
index b95df40de4..0000000000
--- a/app/src/main/res/color/outlined_button_bg.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/app/src/main/res/layout/manga_info_header.xml b/app/src/main/res/layout/manga_info_header.xml
index 48adc6a867..e702b1bb9a 100644
--- a/app/src/main/res/layout/manga_info_header.xml
+++ b/app/src/main/res/layout/manga_info_header.xml
@@ -133,44 +133,42 @@
+ android:layout_height="wrap_content"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp">
-
-
- false
-