mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 20:01:53 +01:00
android 28 sdk
This commit is contained in:
parent
59a0d91679
commit
b17717181d
@ -29,14 +29,14 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 27
|
compileSdkVersion 28
|
||||||
buildToolsVersion '28.0.3'
|
buildToolsVersion '29.0.2'
|
||||||
publishNonDefault true
|
publishNonDefault true
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "eu.kanade.tachiyomi"
|
applicationId "eu.kanade.tachiyomi"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 27
|
targetSdkVersion 28
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
versionCode 41
|
versionCode 41
|
||||||
versionName "0.8.4"
|
versionName "0.8.4"
|
||||||
@ -101,7 +101,7 @@ dependencies {
|
|||||||
implementation 'com.github.inorichi:junrar-android:634c1f5'
|
implementation 'com.github.inorichi:junrar-android:634c1f5'
|
||||||
|
|
||||||
// Android support library
|
// Android support library
|
||||||
final support_library_version = '27.0.2'
|
final support_library_version = '28.0.0'
|
||||||
implementation "com.android.support:support-v4:$support_library_version"
|
implementation "com.android.support:support-v4:$support_library_version"
|
||||||
implementation "com.android.support:appcompat-v7:$support_library_version"
|
implementation "com.android.support:appcompat-v7:$support_library_version"
|
||||||
implementation "com.android.support:cardview-v7:$support_library_version"
|
implementation "com.android.support:cardview-v7:$support_library_version"
|
||||||
|
@ -201,7 +201,7 @@ open class BrowseCatalogueController(bundle: Bundle) :
|
|||||||
catalogue_view.addView(recycler, 1)
|
catalogue_view.addView(recycler, 1)
|
||||||
|
|
||||||
if (oldPosition != RecyclerView.NO_POSITION) {
|
if (oldPosition != RecyclerView.NO_POSITION) {
|
||||||
recycler.layoutManager.scrollToPosition(oldPosition)
|
recycler.layoutManager?.scrollToPosition(oldPosition)
|
||||||
}
|
}
|
||||||
this.recycler = recycler
|
this.recycler = recycler
|
||||||
}
|
}
|
||||||
|
@ -19,8 +19,8 @@ class CatalogueSearchAdapter(val controller: CatalogueSearchController) :
|
|||||||
*/
|
*/
|
||||||
private var bundle = Bundle()
|
private var bundle = Bundle()
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int, payloads: List<Any?>?) {
|
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||||
super.onBindViewHolder(holder, position, payloads)
|
super.onBindViewHolder(holder, position)
|
||||||
restoreHolderState(holder)
|
restoreHolderState(holder)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ class MangaController : RxController, TabbedController {
|
|||||||
const val CHAPTERS_CONTROLLER = 1
|
const val CHAPTERS_CONTROLLER = 1
|
||||||
const val TRACK_CONTROLLER = 2
|
const val TRACK_CONTROLLER = 2
|
||||||
|
|
||||||
private val tabField = TabLayout.Tab::class.java.getDeclaredField("mView")
|
private val tabField = TabLayout.Tab::class.java.getDeclaredField("view")
|
||||||
.apply { isAccessible = true }
|
.apply { isAccessible = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,8 +62,8 @@ open class WebtoonRecyclerView @JvmOverloads constructor(
|
|||||||
override fun onScrollStateChanged(state: Int) {
|
override fun onScrollStateChanged(state: Int) {
|
||||||
super.onScrollStateChanged(state)
|
super.onScrollStateChanged(state)
|
||||||
val layoutManager = layoutManager
|
val layoutManager = layoutManager
|
||||||
val visibleItemCount = layoutManager.childCount
|
val visibleItemCount = layoutManager?.childCount ?: 0
|
||||||
val totalItemCount = layoutManager.itemCount
|
val totalItemCount = layoutManager?.itemCount ?: 0
|
||||||
atLastPosition = visibleItemCount > 0 && lastVisibleItemPosition == totalItemCount - 1
|
atLastPosition = visibleItemCount > 0 && lastVisibleItemPosition == totalItemCount - 1
|
||||||
atFirstPosition = firstVisibleItemPosition == 0
|
atFirstPosition = firstVisibleItemPosition == 0
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ class WebtoonViewer(val activity: ReaderActivity) : BaseViewer {
|
|||||||
recycler.layoutManager = layoutManager
|
recycler.layoutManager = layoutManager
|
||||||
recycler.adapter = adapter
|
recycler.adapter = adapter
|
||||||
recycler.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
recycler.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||||
override fun onScrolled(recyclerView: RecyclerView?, dx: Int, dy: Int) {
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||||
val position = layoutManager.findLastEndVisibleItemPosition()
|
val position = layoutManager.findLastEndVisibleItemPosition()
|
||||||
val item = adapter.items.getOrNull(position)
|
val item = adapter.items.getOrNull(position)
|
||||||
if (item != null && currentPage != item) {
|
if (item != null && currentPage != item) {
|
||||||
@ -98,11 +98,13 @@ class WebtoonViewer(val activity: ReaderActivity) : BaseViewer {
|
|||||||
recycler.longTapListener = f@ { event ->
|
recycler.longTapListener = f@ { event ->
|
||||||
if (activity.menuVisible || config.longTapEnabled) {
|
if (activity.menuVisible || config.longTapEnabled) {
|
||||||
val child = recycler.findChildViewUnder(event.x, event.y)
|
val child = recycler.findChildViewUnder(event.x, event.y)
|
||||||
val position = recycler.getChildAdapterPosition(child)
|
if(child != null) {
|
||||||
val item = adapter.items.getOrNull(position)
|
val position = recycler.getChildAdapterPosition(child)
|
||||||
if (item is ReaderPage) {
|
val item = adapter.items.getOrNull(position)
|
||||||
activity.onPageLongTap(item)
|
if (item is ReaderPage) {
|
||||||
return@f true
|
activity.onPageLongTap(item)
|
||||||
|
return@f true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
|
@ -151,14 +151,14 @@ class SettingsAboutController : SettingsController() {
|
|||||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||||
return MaterialDialog.Builder(activity!!)
|
return MaterialDialog.Builder(activity!!)
|
||||||
.title(R.string.update_check_title)
|
.title(R.string.update_check_title)
|
||||||
.content(args.getString(BODY_KEY))
|
.content(args.getString(BODY_KEY) ?: "")
|
||||||
.positiveText(R.string.update_check_confirm)
|
.positiveText(R.string.update_check_confirm)
|
||||||
.negativeText(R.string.update_check_ignore)
|
.negativeText(R.string.update_check_ignore)
|
||||||
.onPositive { _, _ ->
|
.onPositive { _, _ ->
|
||||||
val appContext = applicationContext
|
val appContext = applicationContext
|
||||||
if (appContext != null) {
|
if (appContext != null) {
|
||||||
// Start download
|
// Start download
|
||||||
val url = args.getString(URL_KEY)
|
val url = args.getString(URL_KEY) ?: ""
|
||||||
UpdaterService.downloadUpdate(appContext, url)
|
UpdaterService.downloadUpdate(appContext, url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
<item name="android:listDivider">@drawable/line_divider_dark</item>
|
<item name="android:listDivider">@drawable/line_divider_dark</item>
|
||||||
|
|
||||||
<!-- Themes -->
|
<!-- Themes -->
|
||||||
|
<item name="windowActionModeOverlay">true</item>
|
||||||
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
|
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
|
||||||
<item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat</item>
|
<item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat</item>
|
||||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Material</item>
|
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Material</item>
|
||||||
@ -30,17 +31,6 @@
|
|||||||
<item name="text_color_primary">@color/textColorPrimaryDark</item>
|
<item name="text_color_primary">@color/textColorPrimaryDark</item>
|
||||||
<item name="background_card">@color/dialogDark</item>
|
<item name="background_card">@color/dialogDark</item>
|
||||||
<item name="icon_color">@color/iconColorDark</item>
|
<item name="icon_color">@color/iconColorDark</item>
|
||||||
|
|
||||||
<!-- Attributes specific for SDK 21 and up -->
|
|
||||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
|
||||||
<item name="android:navigationBarColor">@color/colorDarkPrimaryDark</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="Theme.Tachiyomi" parent="Theme.Base">
|
|
||||||
<!-- Attributes specific for SDK 21 and up -->
|
|
||||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
|
||||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
|
||||||
<item name="android:navigationBarColor">@color/colorDarkPrimaryDark</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Base.Reader.Light" parent="Theme.Base">
|
<style name="Theme.Base.Reader.Light" parent="Theme.Base">
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<!-- Attributes specific for SDK 21 and up -->
|
<!-- Attributes specific for SDK 21 and up -->
|
||||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
<item name="android:navigationBarColor">@color/colorPrimaryDark</item>
|
<item name="android:navigationBarColor">@color/colorPrimary</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Tachiyomi.DarkBlue" parent="Theme.Base">
|
<style name="Theme.Tachiyomi.DarkBlue" parent="Theme.Base">
|
||||||
|
Loading…
Reference in New Issue
Block a user