Search code examples
javaandroidandroid-studiokiosk

How to display installed apps without using ListView/RecyclerView/CardView etc in Android?


I have an application that lists in a RecyclerView all apps installed in the Android device.

I would like to select them, and then press a button to open a new activity that will show all the apps I have selected.

But I do not want another listview/recycle view, I want then to be displayed just like they are in the home screen: the icon with the name under it, side by side, etc… Just like it is in any android device. And they should be able to be open as well.

I really have no idea how to display them in this way in the new activity. I am using java.

To resume, I am trying to develop a kind of Kiosk app, where access to the apps could be controlled.

Any tips will be appreciated. Thanks!


Solution

  • you want to display all the applications in a grid manner just like android default home page, You can use RecyclerView with GridLayoutManager as following code do

    val numberCol=4
    
    val gridLayoutManager = GridLayoutManager(this,numberCol)
    
    mRecyclerView.setLayoutManager(gridLayoutManager)
    
    adapter = ViewAdapter(mlist)
    
    mRecyclerView.setAdapter(adapter)
    
    • you can launch the corresponding app on item click. I hope it will help you!