app Inventor只从列表中选择一次随机项

时间:2014-07-15 21:02:41

标签: android list random app-inventor

您好我正在为我的实习创建这个应用程序。它是一个掌上阅读应用程序,无论出于何种原因使用MIT App Inventor 2都需要它。

一切都很有效,除了我的最后一页,我需要它 ONE Random' fortune'从我的fortunesList中只显示' fortune'

我认为我已正确设置它,但它会一直闪烁/不断重新加载?

提前感谢...

以下是我目前正在使用的块:

enter image description here

1 个答案:

答案 0 :(得分:0)

  

Label1.text 设置为选择随机项获取全局列表

另见documentation

选择一个随机项

enter image description here

从列表中随机挑选一个项目。


编辑:查看截图如何在您的示例中执行,在应用的每次运行中选择随机项,然后在另一个屏幕中显示所选项目

<强>屏蔽1 enter image description here 屏幕财富

enter image description here

另见how to work with multiple screens