2017년 5월 30일 화요일

Instantiate dynamic number of image objects


I am creating an app that connects to a server to display a bunch of images.
The problem is I don't know how many pictures will need to be displayed.
Therefore I need to create the image object in the code and add it to a table arrangement. How do you create a new image object through code?

--
App Inventor can't create components at runtime (dynamically) You have to pre-place everything you are going to use and be creative on how to use use it.
In this case, you can place 5 or 10 components and make them visible only if you need them. If you need more, then consider ceating a paging system, where you show 10 at a time, and the user touches a PREVIOUS and NEXT button to access the other.
Then you reuse the same 10 image component over and over.

-- 

댓글 없음:

댓글 쓰기