mirror of
https://github.com/jrpie/Launcher.git
synced 2025-04-19 10:20:51 +02:00
Fix older API onclicks
This commit is contained in:
parent
dc1238e4e0
commit
a56cec7f9e
9 changed files with 19 additions and 9 deletions
|
@ -27,6 +27,9 @@ class ChooseActivity : AppCompatActivity() {
|
|||
|
||||
setContentView(R.layout.activity_choose)
|
||||
|
||||
// As older APIs somehow do not recognize the xml defined onClick
|
||||
close_chooser.setOnClickListener() { finish() }
|
||||
|
||||
val bundle = intent.extras
|
||||
val action = bundle!!.getString("action") // why choose an app
|
||||
val forApp = bundle.getString("forApp") // which app we choose
|
||||
|
|
|
@ -44,6 +44,9 @@ class FirstStartupActivity : AppCompatActivity(){
|
|||
defaultApps = resetSettings(sharedPref, this) // UP, DOWN, RIGHT, LEFT, VOLUME_UP, VOLUME_DOWN
|
||||
else
|
||||
app_bar.visibility = View.VISIBLE
|
||||
|
||||
// As older APIs somehow do not recognize the xml defined onClick
|
||||
close_tutorial.setOnClickListener() { finish() }
|
||||
}
|
||||
|
||||
/** Touch- and Key-related functions to navigate */
|
||||
|
|
|
@ -51,10 +51,7 @@ class MainActivity : AppCompatActivity(),
|
|||
showSettingsIcon()
|
||||
|
||||
// As older APIs somehow do not recognize the xml defined onClick
|
||||
findViewById<View>(R.id.settingstooltip).setOnClickListener() {
|
||||
openSettings()
|
||||
true
|
||||
}
|
||||
settingstooltip.setOnClickListener() { openSettings() }
|
||||
|
||||
// First Startup
|
||||
if (!sharedPref.getBoolean("startedBefore", false)){
|
||||
|
|
|
@ -32,6 +32,9 @@ class SettingsActivity : AppCompatActivity() {
|
|||
viewPager.adapter = sectionsPagerAdapter
|
||||
val tabs: TabLayout = findViewById(R.id.tabs)
|
||||
tabs.setupWithViewPager(viewPager)
|
||||
|
||||
// As older APIs somehow do not recognize the xml defined onClick
|
||||
close_settings.setOnClickListener() { finish() }
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue