launch the selected app on click
This commit is contained in:
parent
8462d76aa7
commit
a195bff520
1 changed files with 6 additions and 1 deletions
|
@ -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…
Reference in a new issue