mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-01-28 22:49:54 +01:00
launch the selected app on click
This commit is contained in:
parent
8462d76aa7
commit
a195bff520
@ -99,7 +99,12 @@ class MainActivity : SimpleActivity() {
|
||||
|
||||
private fun setupAdapter(launchers: ArrayList<AppLauncher>) {
|
||||
LaunchersAdapter(this, launchers, launchers_fastscroller) {
|
||||
|
||||
val launchIntent = packageManager.getLaunchIntentForPackage((it as AppLauncher).packageName)
|
||||
try {
|
||||
startActivity(launchIntent)
|
||||
} catch (e: Exception) {
|
||||
showErrorToast(e)
|
||||
}
|
||||
}.apply {
|
||||
launchers_grid.adapter = this
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user