0

How to display a large amount of "views" in an activity using Android Studio ?

I'm relatively new on app development. I am working on an app in which a picture is treated as such : 1) I pixelate it, with the height / width defined by the user (using a seekbar, *I already have done this part*) 2) Displaying a grid of pixel matching the new pixelated image, where the user can enable or disable a pixel. The 2) doesn't need to display every pixel on screen, the user would have to scroll vertically or horizontally. I already tried to use a "RecyclerView" using a GridLayout adapter (nb of columns match pixelated image's width) and displaying "imageViews" (without image, just a background color) as pixels, with a click event to enable/disable one of these. Problem : using a (let's say) 100 by 100 "pixel" grid, the app is so slow that a pixel disables 5 seconds after I click it (the "visible" grid is only about 6 by 6 pixels at the moment). Do you think I made something wrong in my recyclerView ? Should I use another thing instead of an "imageView"/"recyclerView"? Thanks in advance 🙂

10th Aug 2022, 6:56 AM
Arthur Le Floch
3 odpowiedzi
0
Did you test your code in an Android device or only in Android Studio?
10th Aug 2022, 7:15 AM
JaScript
JaScript - avatar
0
Yes I tested it several times on my android phone...
10th Aug 2022, 7:21 AM
Arthur Le Floch
0
I have an alternative solution which involves a grid layout using only a part of the pixelated image, and I will use buttons to navigate on the image (left riqht up n down), updating the whole grid layout every time
10th Aug 2022, 10:42 AM
Arthur Le Floch