Help test nb191

P.S. I would have added a fifth option to the 4 categories of font family, Custom .ttf , that would have popped up a modal file request.

My lazy attention focus totally missed the surrounding upload option, and had no clue that it was for .ttf files (any other types?)

That I do not know. I imagine that it is any font format supported by Android (possibly different depending on Android version). @preetvadaliya might be able to expand on that.

I was able to successfully load a .TTF file after copying it from my C:\Windows\Fonts directory.

The Windows Fonts folder has plenty of fonts, so I would not bother looking for more.

A direct upload was forbidden by Windows, but I was able to copy the .TTF file from that folder to my desktop, where my browser upload succeeded.

Preview in Ai2 worked, along with Companion testing.

  • Add "every component" block (@Vishwas-Adiga)

I was finally able to generate one of these by Typeblocking, but now I have no idea what to do with it.
component_all_component_block

Edit - in retrospect, I suppose it could be used as a component type checker, using IS IN LIST. Still thinking of a case for that.

...except you need a license from Microsoft to use any of their fonts (probably the same for any big names in the font business, Apple springs to mind).

costly too.

It would be worth mentioning in the Documentation that you cannot simply copy a font from your computer to your App Inventor Project without buying a license.

It is useful together with the advanced blocks...
Currently we have to create a list, which contains all for example checkbox components... now we can use that new block instead...

In the example below replace the list by every Checkbox App Inventor Tutorials and Examples: Checkbox | Pura Vida Apps

Taifun

1 Like

:frowning_face:
As usual, I can not use this ai2-test server and ai2 server, since the google account problem. We in China can not use google server.
Is there other way to log in the server with no google account?

Yes, you can go to login.appinventor.edu/login. You can then setup an account using any email address.

1 Like

Thanks jis, now I can login with any email. :slight_smile:

1 Like

image
empty string still there

1 Like



better to rename this two as first (or last) value in the list

I've used @Taifun's sample code pattern with generic blocks in several projects already.

However, the every block would fail me if I had more than one radio button (list of checkboxes) or if I was dealing with components lined up in rows and columns, where enumerating the components in lists was needed to establish context (row and column number) working backwards from a component, using the INDEX IN LIST block.

Maybe an EVERY COMPONENT in CONTAINER block would be more useful for cases more complex than single radio button samples.

1 Like

I finally thought of a use case for the EVERY component block.
Setting themes, like dark mode, where you want to flip colors regardless of context or function. Or maybe language fonts, if you've got the .ttf and license.

1 Like

for "custom font typeface support", I tried materialIcon, it's working fine on label and button.
For FontAwesome icon, I can set the htmlFormat of label to true and set it's text as "&#x" + its unicode.
but how to set button use fontAwesome?

And I got an error when try to connect companion (running in LDPlayer android emulator, Android 7.1.2 ):
Snipaste_2023-02-10_11-49-32

Emulator - Pixel 4XL, Android 12:


when i do this

i get this:
image

i think both of these statements should be true.

the same behavior is at play here:

image
the above returns true

but when i do this:

i get this error
image

@ewpatton

1 Like

Sorry, I temporarily made this thread private on my phone shooting for the like button but hit the wrench instead.

I think I fixed it.

Talk about the throwing a wrench into the works :confounded:

3 Likes

I've filed a bug here and am working on a fix:

1 Like

When you connect to the emulator, which connection mode do you use: companion, emulator, or USB?