Move page indicator to bottom center, and use a shadow instead of a background. Other category in catalogue list is now placed at the end

This commit is contained in:
inorichi
2017-11-18 14:09:28 +01:00
parent c437a33f2a
commit 88d1f29fe2
6 changed files with 38 additions and 14 deletions
@@ -0,0 +1,17 @@
package eu.kanade.tachiyomi.ui.reader
import android.content.Context
import android.graphics.Canvas
import android.support.v7.widget.AppCompatTextView
import android.util.AttributeSet
class PageIndicatorTextView(context: Context, attrs: AttributeSet? = null) :
AppCompatTextView(context, attrs) {
override fun onDraw(canvas: Canvas) {
// We want the shadow to look like an outline
for (i in 0..5) {
super.onDraw(canvas)
}
}
}
@@ -8,7 +8,6 @@ import android.graphics.Color
import android.os.Build
import android.os.Build.VERSION_CODES.KITKAT
import android.os.Bundle
import android.support.v4.content.ContextCompat
import android.view.*
import android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
import android.view.animation.Animation
@@ -513,12 +512,8 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
val rootView = window.decorView.rootView
if (theme == BLACK_THEME) {
rootView.setBackgroundColor(Color.BLACK)
page_number.setTextColor(ContextCompat.getColor(this, R.color.textColorPrimaryDark))
page_number.setBackgroundColor(ContextCompat.getColor(this, R.color.pageNumberBackgroundDark))
} else {
rootView.setBackgroundColor(Color.WHITE)
page_number.setTextColor(ContextCompat.getColor(this, R.color.textColorPrimaryLight))
page_number.setBackgroundColor(ContextCompat.getColor(this, R.color.pageNumberBackgroundLight))
}
}