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!
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)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.