1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-11-10 04:52:38 +01:00

Introduce android ktx

This commit is contained in:
Allan Wang 2018-12-25 22:27:23 -05:00
parent 9fb5d8a3d2
commit d1ed8498e5
No known key found for this signature in database
GPG Key ID: C93E3F9C679D7A56
3 changed files with 6 additions and 2 deletions

View File

@ -184,6 +184,8 @@ dependencies {
// TODO temp
implementation "org.jetbrains.anko:anko-commons:0.10.8"
implementation "androidx.core:core-ktx:${KTX}"
// implementation "org.koin:koin-android:${KOIN}"
// testImplementation "org.koin:koin-test:${KOIN}"
// androidTestImplementation "org.koin:koin-test:${KOIN}"

View File

@ -25,6 +25,7 @@ import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.children
import androidx.fragment.app.Fragment
import ca.allanwang.kau.kotlin.LazyResettableRegistry
import ca.allanwang.kau.utils.Kotterknife
@ -33,7 +34,6 @@ import ca.allanwang.kau.utils.setOnSingleTapListener
import com.pitchedapps.frost.R
import com.pitchedapps.frost.activities.IntroActivity
import com.pitchedapps.frost.utils.Prefs
import org.jetbrains.anko.childrenSequence
/**
* Created by Allan Wang on 2017-07-28.
@ -95,7 +95,7 @@ abstract class BaseIntroFragment(val layoutRes: Int) : Fragment() {
}
protected open fun themeFragmentImpl() {
view?.childrenSequence()?.forEach { (it as? TextView)?.setTextColor(Prefs.textColor) }
(view as? ViewGroup)?.children?.forEach { (it as? TextView)?.setTextColor(Prefs.textColor) }
}
protected val viewArray: Array<Array<out View>> by lazyResettableRegistered { viewArray() }

View File

@ -44,6 +44,8 @@ EXOMEDIA=4.3.0
KOIN=1.0.2
# https://github.com/mockk/mockk/releases
MOCKK=1.8.13.kotlin13
# https://mvnrepository.com/artifact/androidx.core/core-ktx?repo=google
KTX=1.0.1
# https://github.com/FasterXML/jackson-core/releases
JACKSON=2.9.8