mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 22:39:18 +01:00
Target sdk 26. Dependency updates.
This commit is contained in:
parent
54c8b3ef29
commit
75c41b645a
@ -29,14 +29,14 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 25
|
compileSdkVersion 26
|
||||||
buildToolsVersion "25.0.2"
|
buildToolsVersion "26.0.1"
|
||||||
publishNonDefault true
|
publishNonDefault true
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "eu.kanade.tachiyomi"
|
applicationId "eu.kanade.tachiyomi"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 25
|
targetSdkVersion 26
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
versionCode 26
|
versionCode 26
|
||||||
versionName "0.6.3"
|
versionName "0.6.3"
|
||||||
@ -102,12 +102,13 @@ dependencies {
|
|||||||
compile 'com.github.inorichi:junrar-android:634c1f5'
|
compile 'com.github.inorichi:junrar-android:634c1f5'
|
||||||
|
|
||||||
// Android support library
|
// Android support library
|
||||||
final support_library_version = '25.4.0'
|
final support_library_version = '26.1.0'
|
||||||
compile "com.android.support:support-v4:$support_library_version"
|
compile "com.android.support:support-v4:$support_library_version"
|
||||||
compile "com.android.support:appcompat-v7:$support_library_version"
|
compile "com.android.support:appcompat-v7:$support_library_version"
|
||||||
compile "com.android.support:cardview-v7:$support_library_version"
|
compile "com.android.support:cardview-v7:$support_library_version"
|
||||||
compile "com.android.support:design:$support_library_version"
|
compile "com.android.support:design:$support_library_version"
|
||||||
compile "com.android.support:recyclerview-v7:$support_library_version"
|
compile "com.android.support:recyclerview-v7:$support_library_version"
|
||||||
|
compile "com.android.support:preference-v7:$support_library_version"
|
||||||
compile "com.android.support:support-annotations:$support_library_version"
|
compile "com.android.support:support-annotations:$support_library_version"
|
||||||
compile "com.android.support:customtabs:$support_library_version"
|
compile "com.android.support:customtabs:$support_library_version"
|
||||||
|
|
||||||
@ -117,13 +118,13 @@ dependencies {
|
|||||||
|
|
||||||
// ReactiveX
|
// ReactiveX
|
||||||
compile 'io.reactivex:rxandroid:1.2.1'
|
compile 'io.reactivex:rxandroid:1.2.1'
|
||||||
compile 'io.reactivex:rxjava:1.3.0'
|
compile 'io.reactivex:rxjava:1.3.2'
|
||||||
compile 'com.jakewharton.rxrelay:rxrelay:1.2.0'
|
compile 'com.jakewharton.rxrelay:rxrelay:1.2.0'
|
||||||
compile 'com.f2prateek.rx.preferences:rx-preferences:1.0.2'
|
compile 'com.f2prateek.rx.preferences:rx-preferences:1.0.2'
|
||||||
compile 'com.github.pwittchen:reactivenetwork:0.7.0'
|
compile 'com.github.pwittchen:reactivenetwork:0.7.0'
|
||||||
|
|
||||||
// Network client
|
// Network client
|
||||||
compile "com.squareup.okhttp3:okhttp:3.8.1"
|
compile "com.squareup.okhttp3:okhttp:3.9.0"
|
||||||
compile 'com.squareup.okio:okio:1.13.0'
|
compile 'com.squareup.okio:okio:1.13.0'
|
||||||
|
|
||||||
// REST
|
// REST
|
||||||
@ -133,14 +134,14 @@ dependencies {
|
|||||||
compile "com.squareup.retrofit2:adapter-rxjava:$retrofit_version"
|
compile "com.squareup.retrofit2:adapter-rxjava:$retrofit_version"
|
||||||
|
|
||||||
// JSON
|
// JSON
|
||||||
compile 'com.google.code.gson:gson:2.8.1'
|
compile 'com.google.code.gson:gson:2.8.2'
|
||||||
compile 'com.github.salomonbrys.kotson:kotson:2.5.0'
|
compile 'com.github.salomonbrys.kotson:kotson:2.5.0'
|
||||||
|
|
||||||
// YAML
|
// YAML
|
||||||
compile 'com.github.bmoliveira:snake-yaml:v1.18-android'
|
compile 'com.github.bmoliveira:snake-yaml:v1.18-android'
|
||||||
|
|
||||||
// JavaScript engine
|
// JavaScript engine
|
||||||
compile 'com.squareup.duktape:duktape-android:1.1.0'
|
compile 'com.squareup.duktape:duktape-android:1.2.0'
|
||||||
|
|
||||||
// Disk
|
// Disk
|
||||||
compile 'com.jakewharton:disklrucache:2.0.2'
|
compile 'com.jakewharton:disklrucache:2.0.2'
|
||||||
@ -151,7 +152,7 @@ dependencies {
|
|||||||
|
|
||||||
// Job scheduling
|
// Job scheduling
|
||||||
compile 'com.evernote:android-job:1.1.11'
|
compile 'com.evernote:android-job:1.1.11'
|
||||||
compile 'com.google.android.gms:play-services-gcm:11.0.1'
|
compile 'com.google.android.gms:play-services-gcm:11.4.0'
|
||||||
|
|
||||||
// Changelog
|
// Changelog
|
||||||
compile 'com.github.gabrielemariotti.changeloglib:changelog:2.1.0'
|
compile 'com.github.gabrielemariotti.changeloglib:changelog:2.1.0'
|
||||||
@ -188,14 +189,16 @@ dependencies {
|
|||||||
compile 'eu.davidea:flexible-adapter:5.0.0-rc1'
|
compile 'eu.davidea:flexible-adapter:5.0.0-rc1'
|
||||||
compile 'com.nononsenseapps:filepicker:2.5.2'
|
compile 'com.nononsenseapps:filepicker:2.5.2'
|
||||||
compile 'com.github.amulyakhare:TextDrawable:558677e'
|
compile 'com.github.amulyakhare:TextDrawable:558677e'
|
||||||
compile 'com.afollestad.material-dialogs:core:0.9.4.5'
|
compile('com.afollestad.material-dialogs:core:0.9.4.7') {
|
||||||
|
exclude group: "com.android.support", module: "support-v13"
|
||||||
|
}
|
||||||
compile 'me.zhanghai.android.systemuihelper:library:1.0.0'
|
compile 'me.zhanghai.android.systemuihelper:library:1.0.0'
|
||||||
compile 'com.nightlynexus.viewstatepageradapter:viewstatepageradapter:1.0.4'
|
compile 'com.nightlynexus.viewstatepageradapter:viewstatepageradapter:1.0.4'
|
||||||
compile 'com.github.mthli:Slice:v1.2'
|
compile 'com.github.mthli:Slice:v1.2'
|
||||||
|
|
||||||
// Conductor
|
// Conductor
|
||||||
compile "com.bluelinelabs:conductor:2.1.4"
|
compile "com.bluelinelabs:conductor:2.1.4"
|
||||||
compile 'com.github.inorichi:conductor-support-preference:9e36460'
|
compile 'com.github.inorichi:conductor-support-preference:26.0.2'
|
||||||
|
|
||||||
// RxBindings
|
// RxBindings
|
||||||
final rxbindings_version = '1.0.1'
|
final rxbindings_version = '1.0.1'
|
||||||
@ -218,7 +221,7 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.1.4'
|
ext.kotlin_version = '1.1.50'
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
@ -231,18 +234,6 @@ repositories {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Workaround to force a support lib version
|
|
||||||
configurations.all {
|
|
||||||
resolutionStrategy.eachDependency { details ->
|
|
||||||
def requested = details.requested
|
|
||||||
if (requested.group == 'com.android.support') {
|
|
||||||
if (!requested.name.startsWith("multidex")) {
|
|
||||||
details.useVersion '25.4.0'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// add support for placeholders in resource files
|
// add support for placeholders in resource files
|
||||||
//https://code.google.com/p/android/issues/detail?id=69224
|
//https://code.google.com/p/android/issues/detail?id=69224
|
||||||
def replacePlaceholdersInFile(basePath, fileName, placeholders) {
|
def replacePlaceholdersInFile(basePath, fileName, placeholders) {
|
||||||
|
@ -45,8 +45,8 @@ class ProgressItem : AbstractFlexibleItem<ProgressItem.Holder>() {
|
|||||||
|
|
||||||
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
|
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
|
||||||
|
|
||||||
val progressBar = view.findViewById(R.id.progress_bar) as ProgressBar
|
val progressBar: ProgressBar = view.findViewById(R.id.progress_bar)
|
||||||
val progressMessage = view.findViewById(R.id.progress_message) as TextView
|
val progressMessage: TextView = view.findViewById(R.id.progress_message)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -32,10 +32,8 @@ open class CheckboxItem(val filter: Filter.CheckBox) : AbstractFlexibleItem<Chec
|
|||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
if (other is CheckboxItem) {
|
if (javaClass != other?.javaClass) return false
|
||||||
return filter == other.filter
|
return filter == (other as CheckboxItem).filter
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
@ -44,6 +42,6 @@ open class CheckboxItem(val filter: Filter.CheckBox) : AbstractFlexibleItem<Chec
|
|||||||
|
|
||||||
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
|
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
|
||||||
|
|
||||||
val check = itemView.findViewById(R.id.nav_view_item) as CheckBox
|
val check: CheckBox = itemView.findViewById(R.id.nav_view_item)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -34,10 +34,8 @@ class GroupItem(val filter: Filter.Group<*>) : AbstractExpandableHeaderItem<Grou
|
|||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
if (other is GroupItem) {
|
if (javaClass != other?.javaClass) return false
|
||||||
return filter == other.filter
|
return filter == (other as GroupItem).filter
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
@ -46,8 +44,8 @@ class GroupItem(val filter: Filter.Group<*>) : AbstractExpandableHeaderItem<Grou
|
|||||||
|
|
||||||
open class Holder(view: View, adapter: FlexibleAdapter<*>) : ExpandableViewHolder(view, adapter, true) {
|
open class Holder(view: View, adapter: FlexibleAdapter<*>) : ExpandableViewHolder(view, adapter, true) {
|
||||||
|
|
||||||
val title = itemView.findViewById(R.id.title) as TextView
|
val title: TextView = itemView.findViewById(R.id.title)
|
||||||
val icon = itemView.findViewById(R.id.expand_icon) as ImageView
|
val icon: ImageView = itemView.findViewById(R.id.expand_icon)
|
||||||
|
|
||||||
override fun shouldNotifyParentOnClick(): Boolean {
|
override fun shouldNotifyParentOnClick(): Boolean {
|
||||||
return true
|
return true
|
||||||
|
@ -29,10 +29,8 @@ class HeaderItem(val filter: Filter.Header) : AbstractHeaderItem<HeaderItem.Hold
|
|||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
if (other is HeaderItem) {
|
if (javaClass != other?.javaClass) return false
|
||||||
return filter == other.filter
|
return filter == (other as HeaderItem).filter
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
|
@ -15,10 +15,8 @@ class TriStateSectionItem(filter: Filter.TriState) : TriStateItem(filter), ISect
|
|||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
if (other is TriStateSectionItem) {
|
if (javaClass != other?.javaClass) return false
|
||||||
return filter == other.filter
|
return filter == (other as TriStateSectionItem).filter
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
@ -38,10 +36,8 @@ class TextSectionItem(filter: Filter.Text) : TextItem(filter), ISectionable<Text
|
|||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
if (other is TextSectionItem) {
|
if (javaClass != other?.javaClass) return false
|
||||||
return filter == other.filter
|
return filter == (other as TextSectionItem).filter
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
@ -61,10 +57,8 @@ class CheckboxSectionItem(filter: Filter.CheckBox) : CheckboxItem(filter), ISect
|
|||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
if (other is CheckboxSectionItem) {
|
if (javaClass != other?.javaClass) return false
|
||||||
return filter == other.filter
|
return filter == (other as CheckboxSectionItem).filter
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
@ -84,10 +78,8 @@ class SelectSectionItem(filter: Filter.Select<*>) : SelectItem(filter), ISection
|
|||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
if (other is SelectSectionItem) {
|
if (javaClass != other?.javaClass) return false
|
||||||
return filter == other.filter
|
return filter == (other as SelectSectionItem).filter
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
|
@ -40,10 +40,8 @@ open class SelectItem(val filter: Filter.Select<*>) : AbstractFlexibleItem<Selec
|
|||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
if (other is SelectItem) {
|
if (javaClass != other?.javaClass) return false
|
||||||
return filter == other.filter
|
return filter == (other as SelectItem).filter
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
@ -52,7 +50,7 @@ open class SelectItem(val filter: Filter.Select<*>) : AbstractFlexibleItem<Selec
|
|||||||
|
|
||||||
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
|
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
|
||||||
|
|
||||||
val text = itemView.findViewById(R.id.nav_view_item_text) as TextView
|
val text: TextView = itemView.findViewById(R.id.nav_view_item_text)
|
||||||
val spinner = itemView.findViewById(R.id.nav_view_item) as Spinner
|
val spinner: Spinner = itemView.findViewById(R.id.nav_view_item)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -27,10 +27,8 @@ class SeparatorItem(val filter: Filter.Separator) : AbstractHeaderItem<Separator
|
|||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
if (other is SeparatorItem) {
|
if (javaClass != other?.javaClass) return false
|
||||||
return filter == other.filter
|
return filter == (other as SeparatorItem).filter
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
|
@ -32,10 +32,8 @@ class SortGroup(val filter: Filter.Sort) : AbstractExpandableHeaderItem<SortGrou
|
|||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
if (other is SortGroup) {
|
if (javaClass != other?.javaClass) return false
|
||||||
return filter == other.filter
|
return filter == (other as SortGroup).filter
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
|
@ -54,11 +54,10 @@ class SortItem(val name: String, val group: SortGroup) : AbstractSectionableItem
|
|||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
if (other is SortItem) {
|
if (javaClass != other?.javaClass) return false
|
||||||
|
other as SortItem
|
||||||
return name == other.name && group == other.group
|
return name == other.name && group == other.group
|
||||||
}
|
}
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
var result = name.hashCode()
|
var result = name.hashCode()
|
||||||
@ -68,7 +67,7 @@ class SortItem(val name: String, val group: SortGroup) : AbstractSectionableItem
|
|||||||
|
|
||||||
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
|
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
|
||||||
|
|
||||||
val text = itemView.findViewById(R.id.nav_view_item) as CheckedTextView
|
val text: CheckedTextView = itemView.findViewById(R.id.nav_view_item)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -34,10 +34,8 @@ open class TextItem(val filter: Filter.Text) : AbstractFlexibleItem<TextItem.Hol
|
|||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
if (other is TextItem) {
|
if (javaClass != other?.javaClass) return false
|
||||||
return filter == other.filter
|
return filter == (other as TextItem).filter
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
@ -46,7 +44,7 @@ open class TextItem(val filter: Filter.Text) : AbstractFlexibleItem<TextItem.Hol
|
|||||||
|
|
||||||
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
|
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
|
||||||
|
|
||||||
val wrapper = itemView.findViewById(R.id.nav_view_item_wrapper) as TextInputLayout
|
val wrapper: TextInputLayout = itemView.findViewById(R.id.nav_view_item_wrapper)
|
||||||
val edit = itemView.findViewById(R.id.nav_view_item) as EditText
|
val edit: EditText = itemView.findViewById(R.id.nav_view_item)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -51,10 +51,8 @@ open class TriStateItem(val filter: Filter.TriState) : AbstractFlexibleItem<TriS
|
|||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
if (other is TriStateItem) {
|
if (javaClass != other?.javaClass) return false
|
||||||
return filter == other.filter
|
return filter == (other as TriStateItem).filter
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
@ -63,7 +61,7 @@ open class TriStateItem(val filter: Filter.TriState) : AbstractFlexibleItem<TriS
|
|||||||
|
|
||||||
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
|
class Holder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter) {
|
||||||
|
|
||||||
val text = itemView.findViewById(TR.id.nav_view_item) as CheckedTextView
|
val text: CheckedTextView = itemView.findViewById(TR.id.nav_view_item)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
// Align with native checkbox
|
// Align with native checkbox
|
||||||
|
@ -99,7 +99,7 @@ class MainActivity : BaseActivity() {
|
|||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
val container = findViewById(R.id.controller_container) as ViewGroup
|
val container: ViewGroup = findViewById(R.id.controller_container)
|
||||||
|
|
||||||
router = Conductor.attachRouter(this, container, savedInstanceState)
|
router = Conductor.attachRouter(this, container, savedInstanceState)
|
||||||
if (!router.hasRootController()) {
|
if (!router.hasRootController()) {
|
||||||
|
@ -43,7 +43,7 @@ class SetTrackChaptersDialog<T> : DialogController
|
|||||||
val view = dialog.customView
|
val view = dialog.customView
|
||||||
if (view != null) {
|
if (view != null) {
|
||||||
// Remove focus to update selected number
|
// Remove focus to update selected number
|
||||||
val np = view.findViewById(R.id.chapters_picker) as NumberPicker
|
val np: NumberPicker = view.findViewById(R.id.chapters_picker)
|
||||||
np.clearFocus()
|
np.clearFocus()
|
||||||
|
|
||||||
(targetController as? Listener)?.setChaptersRead(item, np.value)
|
(targetController as? Listener)?.setChaptersRead(item, np.value)
|
||||||
@ -53,7 +53,7 @@ class SetTrackChaptersDialog<T> : DialogController
|
|||||||
|
|
||||||
val view = dialog.customView
|
val view = dialog.customView
|
||||||
if (view != null) {
|
if (view != null) {
|
||||||
val np = view.findViewById(R.id.chapters_picker) as NumberPicker
|
val np: NumberPicker = view.findViewById(R.id.chapters_picker)
|
||||||
// Set initial value
|
// Set initial value
|
||||||
np.value = item.track?.last_chapter_read ?: 0
|
np.value = item.track?.last_chapter_read ?: 0
|
||||||
// Don't allow to go from 0 to 9999
|
// Don't allow to go from 0 to 9999
|
||||||
|
@ -43,7 +43,7 @@ class SetTrackScoreDialog<T> : DialogController
|
|||||||
val view = dialog.customView
|
val view = dialog.customView
|
||||||
if (view != null) {
|
if (view != null) {
|
||||||
// Remove focus to update selected number
|
// Remove focus to update selected number
|
||||||
val np = view.findViewById(R.id.score_picker) as NumberPicker
|
val np: NumberPicker = view.findViewById(R.id.score_picker)
|
||||||
np.clearFocus()
|
np.clearFocus()
|
||||||
|
|
||||||
(targetController as? Listener)?.setScore(item, np.value)
|
(targetController as? Listener)?.setScore(item, np.value)
|
||||||
@ -53,7 +53,7 @@ class SetTrackScoreDialog<T> : DialogController
|
|||||||
|
|
||||||
val view = dialog.customView
|
val view = dialog.customView
|
||||||
if (view != null) {
|
if (view != null) {
|
||||||
val np = view.findViewById(R.id.score_picker) as NumberPicker
|
val np: NumberPicker = view.findViewById(R.id.score_picker)
|
||||||
val scores = item.service.getScoreList().toTypedArray()
|
val scores = item.service.getScoreList().toTypedArray()
|
||||||
np.maxValue = scores.size - 1
|
np.maxValue = scores.size - 1
|
||||||
np.displayedValues = scores
|
np.displayedValues = scores
|
||||||
|
@ -41,7 +41,7 @@ class DateItem(val date: Date) : AbstractHeaderItem<DateItem.Holder>() {
|
|||||||
|
|
||||||
private val now = Date().time
|
private val now = Date().time
|
||||||
|
|
||||||
val section_text = view.findViewById(R.id.section_text) as TextView
|
val section_text: TextView = view.findViewById(R.id.section_text)
|
||||||
|
|
||||||
fun bind(item: DateItem) {
|
fun bind(item: DateItem) {
|
||||||
section_text.text = DateUtils.getRelativeTimeSpanString(item.date.time, now, DateUtils.DAY_IN_MILLIS)
|
section_text.text = DateUtils.getRelativeTimeSpanString(item.date.time, now, DateUtils.DAY_IN_MILLIS)
|
||||||
|
@ -28,7 +28,7 @@ fun View.getCoordinates() = Point((left + right) / 2, (top + bottom) / 2)
|
|||||||
*/
|
*/
|
||||||
inline fun View.snack(message: String, length: Int = Snackbar.LENGTH_LONG, f: Snackbar.() -> Unit): Snackbar {
|
inline fun View.snack(message: String, length: Int = Snackbar.LENGTH_LONG, f: Snackbar.() -> Unit): Snackbar {
|
||||||
val snack = Snackbar.make(this, message, length)
|
val snack = Snackbar.make(this, message, length)
|
||||||
val textView = snack.view.findViewById(android.support.design.R.id.snackbar_text) as TextView
|
val textView: TextView = snack.view.findViewById(android.support.design.R.id.snackbar_text)
|
||||||
textView.setTextColor(Color.WHITE)
|
textView.setTextColor(Color.WHITE)
|
||||||
snack.f()
|
snack.f()
|
||||||
snack.show()
|
snack.show()
|
||||||
|
@ -104,7 +104,7 @@ open class SimpleNavigationView @JvmOverloads constructor(
|
|||||||
class RadioHolder(parent: ViewGroup, listener: View.OnClickListener?)
|
class RadioHolder(parent: ViewGroup, listener: View.OnClickListener?)
|
||||||
: ClickableHolder(parent.inflate(TR.layout.navigation_view_radio), listener) {
|
: ClickableHolder(parent.inflate(TR.layout.navigation_view_radio), listener) {
|
||||||
|
|
||||||
val radio = itemView.findViewById(TR.id.nav_view_item) as RadioButton
|
val radio: RadioButton = itemView.findViewById(TR.id.nav_view_item)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -113,7 +113,7 @@ open class SimpleNavigationView @JvmOverloads constructor(
|
|||||||
class CheckboxHolder(parent: ViewGroup, listener: View.OnClickListener?)
|
class CheckboxHolder(parent: ViewGroup, listener: View.OnClickListener?)
|
||||||
: ClickableHolder(parent.inflate(TR.layout.navigation_view_checkbox), listener) {
|
: ClickableHolder(parent.inflate(TR.layout.navigation_view_checkbox), listener) {
|
||||||
|
|
||||||
val check = itemView.findViewById(TR.id.nav_view_item) as CheckBox
|
val check: CheckBox = itemView.findViewById(TR.id.nav_view_item)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -122,21 +122,21 @@ open class SimpleNavigationView @JvmOverloads constructor(
|
|||||||
class MultiStateHolder(parent: ViewGroup, listener: View.OnClickListener?)
|
class MultiStateHolder(parent: ViewGroup, listener: View.OnClickListener?)
|
||||||
: ClickableHolder(parent.inflate(TR.layout.navigation_view_checkedtext), listener) {
|
: ClickableHolder(parent.inflate(TR.layout.navigation_view_checkedtext), listener) {
|
||||||
|
|
||||||
val text = itemView.findViewById(TR.id.nav_view_item) as CheckedTextView
|
val text: CheckedTextView = itemView.findViewById(TR.id.nav_view_item)
|
||||||
}
|
}
|
||||||
|
|
||||||
class SpinnerHolder(parent: ViewGroup, listener: OnClickListener? = null)
|
class SpinnerHolder(parent: ViewGroup, listener: OnClickListener? = null)
|
||||||
: ClickableHolder(parent.inflate(TR.layout.navigation_view_spinner), listener) {
|
: ClickableHolder(parent.inflate(TR.layout.navigation_view_spinner), listener) {
|
||||||
|
|
||||||
val text = itemView.findViewById(TR.id.nav_view_item_text) as TextView
|
val text: TextView = itemView.findViewById(TR.id.nav_view_item_text)
|
||||||
val spinner = itemView.findViewById(TR.id.nav_view_item) as Spinner
|
val spinner: Spinner = itemView.findViewById(TR.id.nav_view_item)
|
||||||
}
|
}
|
||||||
|
|
||||||
class EditTextHolder(parent: ViewGroup)
|
class EditTextHolder(parent: ViewGroup)
|
||||||
: Holder(parent.inflate(TR.layout.navigation_view_text)) {
|
: Holder(parent.inflate(TR.layout.navigation_view_text)) {
|
||||||
|
|
||||||
val wrapper = itemView.findViewById(TR.id.nav_view_item_wrapper) as TextInputLayout
|
val wrapper: TextInputLayout = itemView.findViewById(TR.id.nav_view_item_wrapper)
|
||||||
val edit = itemView.findViewById(TR.id.nav_view_item) as EditText
|
val edit: EditText = itemView.findViewById(TR.id.nav_view_item)
|
||||||
}
|
}
|
||||||
|
|
||||||
protected companion object {
|
protected companion object {
|
||||||
|
@ -19,10 +19,6 @@
|
|||||||
android:id="@+id/nav_drawer_catalogues"
|
android:id="@+id/nav_drawer_catalogues"
|
||||||
android:icon="@drawable/ic_explore_black_24dp"
|
android:icon="@drawable/ic_explore_black_24dp"
|
||||||
android:title="@string/label_catalogues" />
|
android:title="@string/label_catalogues" />
|
||||||
<item
|
|
||||||
android:id="@+id/nav_drawer_latest_updates"
|
|
||||||
android:icon="@drawable/ic_watch_later_black_24dp"
|
|
||||||
android:title="@string/label_latest_updates" />
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_drawer_downloads"
|
android:id="@+id/nav_drawer_downloads"
|
||||||
android:icon="@drawable/ic_file_download_black_24dp"
|
android:icon="@drawable/ic_file_download_black_24dp"
|
||||||
|
Loading…
Reference in New Issue
Block a user