res
folder of your appThis is a low-level class, use ResourcesManager
instead
android :: NativeResources :: get_assets
android :: NativeResources :: get_string
android $ NativeResources :: SELF
Type of this instance, automatically specialized in every classcore :: Pointer :: address_is_null
Is the address behind this Object at NULL?jvm :: JavaObject :: as_exception
jvm :: JavaObject :: as_http_response
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Pointer :: defaultinit
jvm :: JavaObject :: defaultinit
core :: Object :: defaultinit
android :: NativeResources :: get_assets
android :: NativeResources :: get_string
jvm :: JavaObject :: is_exception
jvm :: JavaObject :: is_http_response
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Pointer :: native_equals
jvm :: JavaObject :: new_global_ref
Returns a global reference to the Java object behind this referencecore :: Object :: output_class_name
Display class name on stdout (debug only).jvm :: JavaObject :: pop_from_local_frame
Pops the current local reference frame and return a valid reference to selfjvm :: JavaObject :: pop_from_local_frame_with_env
Java implementation ofpop_from_local_frame
core :: Pointer :: premultiply_alpha
Multiply RGB values by their alpha valuejvm :: JavaObject :: to_java_string
JavaString
representation of self
using Java's toString
# Resource manager for android resources placed in the `res` folder of your app
# This is a low-level class, use `ResourcesManager` instead
private extern class NativeResources in "Java" `{ android.content.res.Resources `}
super JavaObject
fun get_assets:NativeAssetManager in "Java" `{ return self.getAssets(); `}
fun get_color(id: Int): Int in "Java" `{ return self.getColor((int)id); `}
fun get_boolean(id: Int): Bool in "Java" `{ return self.getBoolean((int)id); `}
fun get_dimension(id: Int): Int in "Java" `{ return (int)self.getDimension((int)id); `}
fun get_drawable(id: Int): NativeDrawable in "Java" `{ return self.getDrawable((int)id); `}
fun get_identifier(name, def_type, def_package: JavaString): Int in "Java" `{ return self.getIdentifier(name, def_type, def_package); `}
fun get_integer(id: Int): Int in "Java" `{ return self.getInteger((int)id); `}
fun get_string(id: Int): JavaString in "Java" `{ return self.getString((int)id); `}
fun get_resource_entry_name(resid: Int): JavaString in "Java" `{ return self.getResourceEntryName((int)resid); `}
fun get_resource_name(resid: Int): JavaString in "Java" `{ return self.getResourceName((int)resid); `}
fun get_resource_pakage_name(resid: Int): JavaString in "Java" `{ return self.getResourcePackageName((int)resid); `}
fun get_resource_type_name(resid: Int): JavaString in "Java" `{ return self.getResourceTypeName((int)resid); `}
# HACK for bug #845
redef fun new_global_ref import sys, Sys.jni_env `{
Sys sys = NativeResources_sys(self);
JNIEnv *env = Sys_jni_env(sys);
return (*env)->NewGlobalRef(env, self);
`}
end
lib/android/assets_and_resources.nit:184,1--208,3