ref: 5cb16913cd9ec8d0c721b7a7c7731ba3a35d52fc
app/src/main/java/ml/adamsprogs/bimba/FirstRunActivity.kt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
package ml.adamsprogs.bimba import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen import ml.adamsprogs.bimba.dashboard.MainActivity import ml.adamsprogs.bimba.feeds.FeedChooserActivity class FirstRunActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { installSplashScreen() super.onCreate(savedInstanceState) val preferences = getSharedPreferences("shp", MODE_PRIVATE) val intent = if (preferences.getBoolean("firstRun", true)) { Intent(this, FeedChooserActivity::class.java) } else { Intent(this, MainActivity::class.java) } startActivity(intent) finish() } } |