create list of list from one list of value

56 views
Skip to first unread message

Supri Yadi

unread,
Jun 25, 2019, 2:56:40 AM6/25/19
to MIT App Inventor Forum
hello all,

first apologize for my english,
and please help for this:
i get the database from google spreadsheet, and get the value, what i want is to create list of list from the value,
but i not know how to be create the block,
the logic is, every list is have three value, that can be automatic create the second list, etc.
before I say thank you,

best regards,

supriyadi


from here.JPG

TimAI2

unread,
Jun 25, 2019, 4:18:40 AM6/25/19
to MIT App Inventor Forum
Please explain further as to why you would do this.

You have your list "global data" that contains everything you need to reference photos and titles, and indexes appear to be the same.
It could be you just need an additional identifier in your data...

Please show a sample of your raw data coming from the google sheet (your "csv")
Message has been deleted

Supri Yadi

unread,
Jun 25, 2019, 9:07:33 PM6/25/19
to MIT App Inventor Forum
before thanks Tim AI2,

this the screenshot of the spreadsheet, and the block i make, what I do is take data from spreadsheet, and make to a cardview, but I want to make show it per page, and every page, there are 3 items of card view

regards,

supriyadi
for ai2.JPG

Supri Yadi

unread,
Jun 25, 2019, 9:28:07 PM6/25/19
to MIT App Inventor Forum
this screen shoot of block,
thanks before,

best regards,

supriyadi
get from spreadsheet.JPG

Spryd10188

unread,
Jun 26, 2019, 10:42:05 AM6/26/19
to MIT App Inventor Forum
dear all,

now the result after format is like this (1 2 3 4 5 6),
i hope anyone can help me for create the right block,
that i want the result after format, show like this
((1 2 3)(4 5 6)), this can create dinamic list of list after the value have 3 item,
before this, i say thank you for help me

best regards,

supriyadi

ABG

unread,
Jun 26, 2019, 11:12:18 AM6/26/19
to MIT App Inventor Forum
Can you post a link to the documentation of your
cardview extension?

ABG

TimAI2

unread,
Jun 26, 2019, 11:30:19 AM6/26/19
to MIT App Inventor Forum
I just did a split into 3's for someone else:


but we do need to understand your cardview extension / method

Spryd

unread,
Jun 26, 2019, 10:08:51 PM6/26/19
to MIT App Inventor Forum
before thanks for all,

but i'm confuse to combine with my block,
hope anyone help me modif the block,
this is the block i create for card view in a single page,
but the loading of image is very long because the image download from internet.

card view get from spreadsheet.JPG

so i want the block is generate like this, this create the card view per page, every page have 3 item cardview. and the next page have the the rest.

card view per page.JPG

and this the link of extension :

https://s.id/5vV25

i'm sorry for the link, and thanks before,


supriyadi 

TimAI2

unread,
Jun 27, 2019, 6:20:40 AM6/27/19
to mitappinv...@googlegroups.com
OK I have an example solution for you. i have used a set of data and images on a google sheet. You can test the example aia for functionality and to access the blocks. Aia attached after post edit.
This required some complex list manipulation! In essence:
  1. Get your masterList of data
  2. Create lists of all the cardview elements: images, titles, subtitles, content
  3. Convert these lists to lists of 3
  4. Combine these 4 lists to one list of lists in sets of 3
  5. Work through the final list of lists to view the card view in sets of three
This will probably break if your eventual list is not in threes
The cardview extension is not ideal, you have no control over image dimensions / alignment or cardview alignment
You may have more luck trying the colintreeListview extension

BLOCKS

blockscardviewinthrees.png


CardView.aia

Spryd

unread,
Jun 29, 2019, 11:09:39 AM6/29/19
to MIT App Inventor Forum
thanks TimAI2,

this work perfectly,
love this community.

cheers,

supriyadi

Reply all
Reply to author
Forward
0 new messages