garretyoder / Colorful

Android runtime theme library
Apache License 2.0
2.13k stars 194 forks source link

Migrate to AndroidX #43

Open guger opened 5 years ago

guger commented 5 years ago

As the AndroidX version of AppCompat is stable now, I'd recommend to update.

defvs commented 4 years ago

It's as simple as changing the imports in the files.

import io.multimoon.colorful.BaseTheme
import io.multimoon.colorful.CThemeInterface
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity

open class ThemedActivity : AppCompatActivity(), CThemeInterface {

    override var themeString: String = ""

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        handleOnCreate(this, savedInstanceState, BaseTheme.THEME_APPCOMPAT)
    }

    override fun onResume() {
        super.onResume()
        handleOnResume(this)
    }
}