Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy blocks to another screen MIT App Inventor

Tags:

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?

like image 375
user2990406 Avatar asked Jul 21 '14 16:07

user2990406


People also ask

How do you pass data between screens in App Inventor?

To share information between screens, use a TinyDB component. Though you'll have a TinyDB defined on each screen, both really point to the one and only TinyDB database. One or both screens might change the shared data.

How do you copy in MIT App Inventor project?

Click on the Screen Component. Then click control (ctrl) + C on your keyboard. Click on the Screen Component on the new project. Then click control (ctrl) + V on your keyboard.

How do I use multiple monitors in MIT App Inventor?

Adding a second screen To add a new screen to your app, click the Add Screen button in the top toolbar of the Designer window. A dialog window will appear, in which you can provide a name for the new screen.


2 Answers

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 -- i.e., re-initialized.)

like image 72
Taifun Avatar answered Oct 02 '22 14:10

Taifun


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.

like image 40
Franck Dernoncourt Avatar answered Oct 02 '22 15:10

Franck Dernoncourt