diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt b/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt index a7cf4b656..d46370e7c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt @@ -56,7 +56,7 @@ class LocalSource(private val context: Context) : CatalogueSource { } override val id = ID - override val name = "LocalSource" + override val name = context.getString(R.string.local_source) override val lang = "" override val supportsLatest = true diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/main/CatalogueMainPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/main/CatalogueMainPresenter.kt index 2ce3f0a4f..a0745a26a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/main/CatalogueMainPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/main/CatalogueMainPresenter.kt @@ -51,7 +51,14 @@ class CatalogueMainPresenter( fun loadSources() { sourceSubscription?.unsubscribe() - val map = TreeMap> { d1, d2 -> d1.compareTo(d2) } + val map = TreeMap> { d1, d2 -> + // Catalogues without a lang defined will be placed at the end + when { + d1 == "" && d2 != "" -> 1 + d2 == "" && d1 != "" -> -1 + else -> d1.compareTo(d2) + } + } val byLang = sources.groupByTo(map, { it.lang }) val sourceItems = byLang.flatMap { val langItem = LangItem(it.key) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/PageIndicatorTextView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/PageIndicatorTextView.kt new file mode 100644 index 000000000..7aff4c97e --- /dev/null +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/PageIndicatorTextView.kt @@ -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) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index 3e4e3ebf3..1bf2b378e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -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() { 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)) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/PTSansTextView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/PTSansTextView.kt index f813f799c..4152f1767 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/PTSansTextView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/PTSansTextView.kt @@ -38,10 +38,10 @@ class PTSansTextView @JvmOverloads constructor(context: Context, attrs: Attribut } } - override fun draw(canvas: Canvas) { + override fun onDraw(canvas: Canvas) { // Draw two times for a more visible shadow around the text - super.draw(canvas) - super.draw(canvas) + super.onDraw(canvas) + super.onDraw(canvas) } } diff --git a/app/src/main/res/layout/reader_activity.xml b/app/src/main/res/layout/reader_activity.xml index 84a2c6655..b1040c4d4 100644 --- a/app/src/main/res/layout/reader_activity.xml +++ b/app/src/main/res/layout/reader_activity.xml @@ -23,14 +23,19 @@ android:layout_height="wrap_content" android:layout_gravity="center"/> - + android:layout_gravity="bottom|center_horizontal" + android:padding="4dp" + android:textColor="@color/md_white_1000" + android:textStyle="bold" + android:shadowRadius="3" + android:shadowDy="0" + android:shadowDx="0" + android:shadowColor="@color/md_black_1000"/>