mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 06:21:31 +01:00
Fix older API onclicks
This commit is contained in:
parent
dc1238e4e0
commit
a56cec7f9e
9 changed files with 19 additions and 9 deletions
|
@ -11,7 +11,7 @@
|
|||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/darkTheme">
|
||||
android:theme="@style/finnmglasTheme">
|
||||
|
||||
<activity android:name=".MainActivity"
|
||||
android:screenOrientation="portrait"
|
||||
|
|
|
@ -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?) {
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.finnmglas.launcher.FontAwesome
|
||||
android:id="@+id/close_settings"
|
||||
android:id="@+id/close_chooser"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
android:background="?attr/colorPrimary"
|
||||
android:gravity="center|top"
|
||||
android:orientation="vertical"
|
||||
android:padding="32sp"
|
||||
android:paddingTop="16sp"
|
||||
android:paddingLeft="32sp"
|
||||
android:paddingRight="32sp"
|
||||
tools:context=".SettingsActivity">
|
||||
|
||||
<TableLayout
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
android:background="?attr/colorPrimary"
|
||||
android:gravity="center|top"
|
||||
android:orientation="vertical"
|
||||
android:padding="32sp"
|
||||
android:paddingTop="16sp"
|
||||
android:paddingLeft="32sp"
|
||||
android:paddingRight="32sp"
|
||||
tools:context=".SettingsActivity">
|
||||
|
||||
<Button
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="32sp"
|
||||
android:paddingTop="32sp"
|
||||
android:paddingTop="16sp"
|
||||
android:paddingRight="32sp"
|
||||
tools:context=".SettingsActivity">
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue