Copy blocks to another screen MIT App Inventor

I published my app that has many screens, but now I want to go back and add a new feature to those screens. Is there any way that I can just create the new blocks once as a template and paste it to the new screens?


copy-paste of code blocks is not a good idea: instead of creating redundant code, you should think about a redesign of your app, see the following link for more details.

Building apps with many screens

If it seems that your app requires a large number of screens, you might think about redesigning it to not use so many. For example, suppose your app has to show several different screen images all with the same functionality but each image having a different background. One way to code this would be to use a different App Inventor screen for each image, each screen with its own background image. With that method, you'd need as many screens as there are images. But another way to code this is to have only a single screen and change the screen background. Similar ideas apply to other kinds of elements: If each screen image has a label with its own text message, then rather than having multiple screens, each with its own label, you could have a single screen and a single label, and just change label's text.

In App Inventor , you only can copy a complete screen, see the following method

How to copy screens by Scott and a video by Hossein

EDIT : now there is the new backpack cut-and-paste system

The Backpack allows you to carry around blocks throughout your project repositories, allowing blocks to be transferred between projects and between screens. The contents of the Backpack persist throughout an App Inventor session. (NOTE:When you quit your App Inventor session or refresh the App Inventor page in the browser, the Backpack will be emptied -- ie, re-initialized.)


It is not possible to copy objects (blocks, labels, pictures, lists, etc.) from one screen to another. See Issue 2076:

It would be nice to be able to copy objects (labels, pictures, lists, ect.) from one screen to another, theoretically the way it would function is: on the right side on the components list, you could right click on the component you would like to copy and press either copy/paste or you could right click and press send to screen Y. Any blocks related to these components on screen X would be sent with the copied components to screen Y. This would be very useful/helpful instead of trying to recreate multiple pages with the same layout and block structure multiple times.


将块拖到你的包中,如果你想使用,只需检查你的包

链接地址: http://www.djcxy.com/p/80474.html

上一篇: 可以使用hammer.js平移事件并仍然允许用户滚动?

下一篇: 将块复制到另一个屏幕MIT App Inventor