which folder is the assets folder. If you are talking about apps asset folder then please I don't want to upload everytime please give me another way or if not then which?
Having this error when I tried this:
[javac] C:\Users\Administrator\appinventor-sources\appinventor\components\src\com\google\appinventor\components\runtime\util\TextViewUtil.java:149: error: non-static method getAssets() cannot be referenced from a static context
BUILD FAILED
C:\Users\Administrator\appinventor-sources\appinventor\build.xml:16: The following error occurred while executing this line:
C:\Users\Administrator\appinventor-sources\appinventor\build-common.xml:341: The following error occurred while executing this line:
C:\Users\Administrator\appinventor-sources\appinventor\components\build.xml:215: The following error occurred while executing this line:
C:\Users\Administrator\appinventor-sources\appinventor\build-common.xml:125: Compile failed; see the compiler error output for details.
is that full error?
Yes this is the only error
This is the error.
Yes how to solve this error van you help me
Since we can't see your code, the most likely thing I can think of is that you're doing something like Context.getAssets()
, which is wrong because getAssets()
is an instance method but Context
is a class. You need to call it on an instance of Context
instead, typically by calling getContext()
on some other Android object. If you've got an instance of Form
lying around, it is a Context
so you could also use that.
Code:
code:
Code:
Code:
After changing context.getassets to form.getasset im getting
this error:
Use container.$form().getAssets();
Not working
Because this is a util class, you won't have necessarily have access to the form. However, I think the View class in Android has a getContext method, which you should be able to use to get the necessary context for asset lookups.
Make a file selection box under label (Properties) add a custom font interface label before it to tell users what it does. Now, add the code that will set that font face to the one of .ttf file chosen by user. U can see the code of You font extension by Ken for reference to how to do so
Regards
use
container.$context.getAssets();
Hello everyone,
Maybe this will help to simplify the problem, with a very simple example, working with android 12
You can download the apk from this link:
https://aplicaciones.xp3.biz/david/MyIcons.zip
To know the codes of each character:
- Install Regular Font Awesome 6 Free here:
https://use.fontawesome.com/releases/v6.3.0/fontawesome-free-6.3.0-web.zip
-
install the font
-
find or run in Windows: Charmap.exe
Select the font and you will find the icons of this font
- Before clicking on a character/icon, you will see the tooltip of the code that corresponds to it, we need the last 4 digits (exclude "U+") and those are the codes that the apk example puts.
The rest is to select that inputbox, and the slider to make it expand
To make it clickable, I used the ClickZ extension. see at:
Enjoy!
David
All you have to do is to get a ttf file(you can get in on fonts.google.com) and then upload it and use it. There are many fonts to choose . Like this one, Pixelify Sans - Google Fonts
just go there and download a font.