Create a random shuffle list and click to display the correct input value

I have a list in cardview how do I randomize it when I go to the main screen application and click on a list to the next screen to get the correct display?

Screen1


Screen 2

welcome to community
it depends how you are sending data to next screen? and also create a good design on screen 2 for showing that data in a beautiful way,

The results are skewed

I used LIST UTILS and the output could not display as expected.

what do you expected? means what are your expectations from it? a little details because i am not getting what you want

My apk file “Tech NEWS” shows up wrongly and clicks to screen 2 is incorrect. I need help from someone to make it correct?

Example showing correctly: [image] Facebook + [title] Facebook’s news tool lest you transfer pictures to Google Photo + [subtitle] Facebook is released a new tool

TechNews.apk (5.1 MB) I have created that design but I want to ask is to do like this? randomly display the correct list, and click to screen 2 displays correctly

From your block
You shuffle Title and Photo

I want the list to display randomly

That’s weird. Most of us don’t want that! :rofl:

2 Likes

I want the list to display randomly

inbox me with the aia and let me see if i can help with the project
I also faced this issue recently

There is a Math block “random integer from [1] to [100]” (where [1] and [100] can be replaced by any value, including “length of list”) that can be used to specify the index entry of the item in your list that should be displayed.
Of course, since this is random, if you have 10 items there is 1 chance out of 10 that the next item displayed would be the same as the previous. You can of course design more sophisticated logic to prevent one item to be shown too often, but that requires more code.

I made this procedure some time ago to generate lists of random numbers with many options like smallest and biggest number, how many numbers in the list, repeat or unique numbers, sorted or unsorted, if sorted order ascending or descending.
Check it, it may help you generate the lists you need:

2 Likes