launch the clicked app

This commit is contained in:
tibbi
2016-08-13 14:55:37 +02:00
parent c62cfd1b90
commit e6196be791

View File

@ -19,7 +19,10 @@ class MainActivity : SimpleActivity() {
setContentView(R.layout.activity_main) setContentView(R.layout.activity_main)
dbHelper = DbHelper(applicationContext) dbHelper = DbHelper(applicationContext)
launchers_holder.adapter = MyCursorAdapter(applicationContext, dbHelper.getLaunchers()) { launchers_holder.adapter = MyCursorAdapter(applicationContext, dbHelper.getLaunchers()) {
val launchIntent = packageManager.getLaunchIntentForPackage(it.pkgName)
if (launchIntent != null) {
startActivity(launchIntent)
}
} }
} }