this works for me:
create your little class and build with SLC
package com.georgieapps.numbers;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BA.*;
@Version(1.0f)
@ShortName("Numbers")
//@ActivityObject
public class Numbers {
public String ONE = "one";
public String TWO = "two";
public String THREE = "three";
}
open your ide and create a test
search for new class in libraries tab. select it
declare your class in app:
Private numbers As Numbers
refer to class property without "declaring it" in your app:
Log(numbers.ONE) ' just like GRAVITY.CENTER
' if you were thinking of creating the class in inline java, although
you can create and access a homegrown class (similar-ish to above),
i think the only way you can access it is via a javaobject ( runmethod,
getfield, etc). so it's not going to look like what you're trying to achieve
(although, in the end, you're still accessing the class' field).