mirror of
https://github.com/jrpie/Launcher.git
synced 2025-04-19 10:20:51 +02:00
Fix older API alerts, Add titlebar to tutorial (on replay)
This commit is contained in:
parent
c81e6c06bc
commit
dc1238e4e0
10 changed files with 71 additions and 13 deletions
|
@ -42,6 +42,8 @@ class FirstStartupActivity : AppCompatActivity(){
|
|||
|
||||
if (isFirstTime)
|
||||
defaultApps = resetSettings(sharedPref, this) // UP, DOWN, RIGHT, LEFT, VOLUME_UP, VOLUME_DOWN
|
||||
else
|
||||
app_bar.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
/** Touch- and Key-related functions to navigate */
|
||||
|
@ -67,6 +69,10 @@ class FirstStartupActivity : AppCompatActivity(){
|
|||
loadMenu(this)
|
||||
}
|
||||
|
||||
fun backToSettings(view: View){
|
||||
finish()
|
||||
}
|
||||
|
||||
/** Touch- and Key-related functions to navigate */
|
||||
|
||||
private fun loadMenu(context :Context) { // Context needed for packageManager
|
||||
|
@ -94,7 +100,6 @@ class FirstStartupActivity : AppCompatActivity(){
|
|||
editor.putLong("firstStartup", System.currentTimeMillis() / 1000L) // record first startup timestamp
|
||||
editor.apply()
|
||||
}
|
||||
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,10 +38,6 @@ class MainActivity : AppCompatActivity(),
|
|||
val sharedPref = this.getSharedPreferences(
|
||||
getString(R.string.preference_file_key), Context.MODE_PRIVATE)
|
||||
|
||||
// First Startup
|
||||
if (!sharedPref.getBoolean("startedBefore", false))
|
||||
startActivity(Intent(this, FirstStartupActivity::class.java))
|
||||
|
||||
// Flags
|
||||
window.setFlags(
|
||||
WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
||||
|
@ -60,6 +56,11 @@ class MainActivity : AppCompatActivity(),
|
|||
true
|
||||
}
|
||||
|
||||
// First Startup
|
||||
if (!sharedPref.getBoolean("startedBefore", false)){
|
||||
startActivity(Intent(this, FirstStartupActivity::class.java))
|
||||
tooltipTimer.cancel()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStart(){
|
||||
|
|
|
@ -135,7 +135,7 @@ class SettingsActivity : AppCompatActivity() {
|
|||
}
|
||||
// on older sdk: manage app details
|
||||
else {
|
||||
AlertDialog.Builder(this)
|
||||
AlertDialog.Builder(this, R.style.AlertDialogCustom)
|
||||
.setTitle(getString(R.string.alert_cant_choose_launcher))
|
||||
.setMessage(getString(R.string.alert_cant_choose_launcher_message))
|
||||
.setPositiveButton(android.R.string.yes,
|
||||
|
@ -159,7 +159,7 @@ class SettingsActivity : AppCompatActivity() {
|
|||
|
||||
// Show a dialog prompting for confirmation
|
||||
fun resetSettingsClick(view: View) {
|
||||
AlertDialog.Builder(this)
|
||||
AlertDialog.Builder(this, R.style.AlertDialogCustom)
|
||||
.setTitle(getString(R.string.settings_reset))
|
||||
.setMessage(getString(R.string.settings_reset_message))
|
||||
.setPositiveButton(android.R.string.yes,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue