use the shared BaseSplash activity

This commit is contained in:
tibbi 2017-11-29 18:51:06 +01:00
parent 27cf585f24
commit 5b937691e3
3 changed files with 9 additions and 11 deletions

View File

@ -38,7 +38,7 @@ android {
}
dependencies {
compile 'com.simplemobiletools:commons:2.41.19'
compile 'com.simplemobiletools:commons:2.42.6'
}
Properties props = new Properties()

View File

@ -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()
}

View File

@ -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())