hotfix
This commit is contained in:
parent
d109914537
commit
3567b8dced
3 changed files with 39 additions and 23 deletions
|
@ -169,13 +169,28 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
||||||
R.drawable.ic_round_favorite_24
|
R.drawable.ic_round_favorite_24
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
val typedValue = TypedValue()
|
||||||
|
this.theme.resolveAttribute(
|
||||||
|
com.google.android.material.R.attr.colorSecondary,
|
||||||
|
typedValue,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
val color = typedValue.data
|
||||||
|
val typedValue2 = TypedValue()
|
||||||
|
this.theme.resolveAttribute(
|
||||||
|
com.google.android.material.R.attr.colorSecondary,
|
||||||
|
typedValue2,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
val color2 = typedValue.data
|
||||||
|
|
||||||
PopImageButton(
|
PopImageButton(
|
||||||
scope,
|
scope,
|
||||||
binding.mediaFav,
|
binding.mediaFav,
|
||||||
R.drawable.ic_round_favorite_24,
|
R.drawable.ic_round_favorite_24,
|
||||||
R.drawable.ic_round_favorite_border_24,
|
R.drawable.ic_round_favorite_border_24,
|
||||||
com.google.android.material.R.attr.colorSecondary,
|
R.color.bg_opp,
|
||||||
com.google.android.material.R.attr.colorSecondary,
|
R.color.violet_400,
|
||||||
media.isFav
|
media.isFav
|
||||||
) {
|
) {
|
||||||
media.isFav = it
|
media.isFav = it
|
||||||
|
@ -191,7 +206,11 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
||||||
fun total() {
|
fun total() {
|
||||||
val text = SpannableStringBuilder().apply {
|
val text = SpannableStringBuilder().apply {
|
||||||
val typedValue = TypedValue()
|
val typedValue = TypedValue()
|
||||||
this@MediaDetailsActivity.theme.resolveAttribute(com.google.android.material.R.attr.colorOnBackground, typedValue, true)
|
this@MediaDetailsActivity.theme.resolveAttribute(
|
||||||
|
com.google.android.material.R.attr.colorOnBackground,
|
||||||
|
typedValue,
|
||||||
|
true
|
||||||
|
)
|
||||||
val white = typedValue.data
|
val white = typedValue.data
|
||||||
if (media.userStatus != null) {
|
if (media.userStatus != null) {
|
||||||
append(if (media.anime != null) getString(R.string.watched_num) else getString(R.string.read_num))
|
append(if (media.anime != null) getString(R.string.watched_num) else getString(R.string.read_num))
|
||||||
|
@ -401,7 +420,11 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
||||||
if (binding.mediaCover.scaleX == 0f) View.GONE else View.VISIBLE
|
if (binding.mediaCover.scaleX == 0f) View.GONE else View.VISIBLE
|
||||||
val duration = (200 * uiSettings.animationSpeed).toLong()
|
val duration = (200 * uiSettings.animationSpeed).toLong()
|
||||||
val typedValue = TypedValue()
|
val typedValue = TypedValue()
|
||||||
this@MediaDetailsActivity.theme.resolveAttribute(com.google.android.material.R.attr.colorSecondary, typedValue, true)
|
this@MediaDetailsActivity.theme.resolveAttribute(
|
||||||
|
com.google.android.material.R.attr.colorSecondary,
|
||||||
|
typedValue,
|
||||||
|
true
|
||||||
|
)
|
||||||
val color = typedValue.data
|
val color = typedValue.data
|
||||||
if (percentage >= percent && !isCollapsed) {
|
if (percentage >= percent && !isCollapsed) {
|
||||||
isCollapsed = true
|
isCollapsed = true
|
||||||
|
@ -473,6 +496,7 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
||||||
ObjectAnimator.ofFloat(image, "scaleX", 1f, 0f).setDuration(69).start()
|
ObjectAnimator.ofFloat(image, "scaleX", 1f, 0f).setDuration(69).start()
|
||||||
ObjectAnimator.ofFloat(image, "scaleY", 1f, 0f).setDuration(100).start()
|
ObjectAnimator.ofFloat(image, "scaleY", 1f, 0f).setDuration(100).start()
|
||||||
delay(100)
|
delay(100)
|
||||||
|
|
||||||
if (clicked) {
|
if (clicked) {
|
||||||
ObjectAnimator.ofArgb(
|
ObjectAnimator.ofArgb(
|
||||||
image,
|
image,
|
||||||
|
@ -488,13 +512,15 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
||||||
ObjectAnimator.ofFloat(image, "scaleX", 1.5f, 1f).setDuration(100).start()
|
ObjectAnimator.ofFloat(image, "scaleX", 1.5f, 1f).setDuration(100).start()
|
||||||
ObjectAnimator.ofFloat(image, "scaleY", 1.5f, 1f).setDuration(100).start()
|
ObjectAnimator.ofFloat(image, "scaleY", 1.5f, 1f).setDuration(100).start()
|
||||||
delay(200)
|
delay(200)
|
||||||
if (clicked) ObjectAnimator.ofArgb(
|
if (clicked) {
|
||||||
|
ObjectAnimator.ofArgb(
|
||||||
image,
|
image,
|
||||||
"ColorFilter",
|
"ColorFilter",
|
||||||
ContextCompat.getColor(context, c2),
|
ContextCompat.getColor(context, c2),
|
||||||
ContextCompat.getColor(context, c1)
|
ContextCompat.getColor(context, c1)
|
||||||
).setDuration(200).start()
|
).setDuration(200).start()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun enabled(enabled: Boolean) {
|
fun enabled(enabled: Boolean) {
|
||||||
disabled = !enabled
|
disabled = !enabled
|
||||||
|
|
|
@ -3,6 +3,7 @@ package ani.dantotsu.media.anime
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
|
import android.util.TypedValue
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
|
15
stable.md
15
stable.md
|
@ -1,14 +1,3 @@
|
||||||
# 0.1.3
|
# 0.1.4
|
||||||
|
|
||||||
- **Bugfixes:**
|
- hotfix for those who crashed when opening an anime/manga
|
||||||
- Fixes for manga and anime extensions
|
|
||||||
- Fixed softsubs not showing
|
|
||||||
- Fixed various crashes
|
|
||||||
- Fixed manga continue button not showing
|
|
||||||
- Fixed calendar/anime list page not following Material You
|
|
||||||
- probably other stuff I forgor
|
|
||||||
|
|
||||||
- **New Features:**
|
|
||||||
- App coloring rework
|
|
||||||
- Themes! 4 themes added
|
|
||||||
- Added Extension-specific DNS
|
|
Loading…
Add table
Add a link
Reference in a new issue