Why don't work? (cannot find component)

FRETE2_0.aia (54.1 KB)

Hi Karoline

Some issues in your code asides from the problem you have reported. The way you are opening Screens (in Screen 3 for Example) makes additional copies of Screens that are already in memory - which could crash the App. For example:

ToScreen1FromScreen3_a

Use this method, User is returned to the Screen that opened the current Screen. In this case, Screen1 opened Screen3, so 'close screen' will return the User to Screen1.

ToScreen1FromScreen3_b

Well, actually the way Screens are being inadvertently duplicated could be the cause of the issue. :thinking:

Try this version:

FRETE2_1.aia (52.9 KB)

1 Like

Also:

  1. Your images need to be optimised for Android. See my website:
    ProfessorCad: Tips & Tricks

  2. You have many Screens - try to reduce the number of Screens to make the App run more efficiently. The approximate maximum number of Screens is 10. Your Project currently has 12 :upside_down_face: If you absolutely must have so many Screens, consider using virtual Screens instead.

When we define virtual screens, we use one 'real' App Inventor Screen (most often Screen1). Screen-sized Vertical Arrangements on it are displayed/hidden as required - they are the Virtual Screens. This is generally a better approach for multi-screen Apps, they share data without having to "pass" it between screens and it also reduces code duplication, making the App more efficient and the code easier to follow if you have to return to it at a later date.
So, instead of separate "houses", virtual screens are "rooms" of the same "house".

Hi Karoline, let us know how it's going (hopefully well!)

1 Like

Good afternoon! sorry for the delay, I tested your file but I couldn't show the listview yet. it was really crashing my app and your project helped a lot

FRETE2_1 (1).aia (52.9 KB)
Help me please. Thank you.

merging this with the "Why don't work" topic

okay, thank you

I think one of the errors is the FirebaseToken on the fazer and visual screen, they don't match.

I send you another code, although it is not finished.

FRETE2_4.aia (53.7 KB)

1 Like

Your code helped a lot! I will do some implementation, but this is exactly what I need.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.