use the shared BaseSplash activity
This commit is contained in:
parent
27cf585f24
commit
5b937691e3
|
@ -38,7 +38,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.simplemobiletools:commons:2.41.19'
|
||||
compile 'com.simplemobiletools:commons:2.42.6'
|
||||
}
|
||||
|
||||
Properties props = new Properties()
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package com.simplemobiletools.thankyou.activities
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import com.simplemobiletools.commons.activities.BaseSplashActivity
|
||||
|
||||
class SplashActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
class SplashActivity : BaseSplashActivity() {
|
||||
override fun initActivity() {
|
||||
startActivity(Intent(this, MainActivity::class.java))
|
||||
finish()
|
||||
}
|
||||
|
|
|
@ -46,12 +46,16 @@ class MyContentProviderDbHelper private constructor(private val context: Context
|
|||
}
|
||||
|
||||
fun updateTheme(values: ContentValues): Int {
|
||||
if (!isThemeAvailable()) {
|
||||
insertDefaultTheme()
|
||||
}
|
||||
|
||||
val selection = "$COL_ID = ?"
|
||||
val selectionArgs = arrayOf(THEME_ID.toString())
|
||||
return mDb.update(TABLE_NAME, values, selection, selectionArgs)
|
||||
}
|
||||
|
||||
fun isThemeAvailable(): Boolean {
|
||||
private fun isThemeAvailable(): Boolean {
|
||||
val cols = arrayOf(COL_ID)
|
||||
val selection = "$COL_ID = ?"
|
||||
val selectionArgs = arrayOf(THEME_ID.toString())
|
||||
|
@ -65,10 +69,6 @@ class MyContentProviderDbHelper private constructor(private val context: Context
|
|||
}
|
||||
|
||||
fun getSharedTheme(): Cursor? {
|
||||
if (!isThemeAvailable()) {
|
||||
insertDefaultTheme()
|
||||
}
|
||||
|
||||
val cols = arrayOf(COL_TEXT_COLOR, COL_BACKGROUND_COLOR, COL_PRIMARY_COLOR, COL_LAST_UPDATED_TS)
|
||||
val selection = "$COL_ID = ?"
|
||||
val selectionArgs = arrayOf(THEME_ID.toString())
|
||||
|
|
Loading…
Reference in New Issue