Table of contents 2 B4X JavaObject NativeObject
1 B4X platforms .............................................................................................................................. 5
2 General ......................................................................................................................................... 6
3 B4A JavaObject .......................................................................................................................... 7
3.1 B4A JavaObject methods ..................................................................................................... 8
3.1.1 CreateEvent ...................................................................................................................... 8
3.1.2 CreateEventFromUI ......................................................................................................... 9
3.1.3 GetField ............................................................................................................................ 9
3.1.4 GetFieldJO ....................................................................................................................... 9
3.1.5 InitializeArray .................................................................................................................. 9
3.1.6 InitializeContext ............................................................................................................... 9
3.1.7 InitializeNewInstance ..................................................................................................... 10
3.1.8 InitializeStatic ................................................................................................................ 10
3.1.9 IsInitialized ..................................................................................................................... 10
3.1.10 RunMethod ................................................................................................................. 11
3.1.11 RunMethodJO ............................................................................................................ 12
3.1.12 SetField ...................................................................................................................... 12
3.2 How to use it ...................................................................................................................... 13
3.3 B4A examples .................................................................................................................... 16
3.3.1 Get B4A Context ............................................................................................................ 16
3.3.1.1 GetB4A .................................................................................................................. 16
3.3.1.2 getContext .............................................................................................................. 16
3.3.2 ViewUtils ....................................................................................................................... 17
3.3.2.1 getParent ................................................................................................................. 17
3.3.2.2 getRootView .......................................................................................................... 17
3.3.2.3 setRotation ............................................................................................................. 17
3.3.2.4 setRotationX ........................................................................................................... 17
3.3.2.5 setRotationY ........................................................................................................... 18
3.3.2.6 setPivotX ................................................................................................................ 18
3.3.2.7 getPivotX ............................................................................................................... 18
3.3.2.8 setPivotY ................................................................................................................ 18
3.3.2.9 getPivotY ............................................................................................................... 18
3.3.3 EditText Utils ................................................................................................................. 19
3.3.3.1 setCursorVisible ..................................................................................................... 19
3.3.3.2 setTextIsSelectable ................................................................................................. 19
3.3.3.3 setSelection ............................................................................................................ 19
3.3.3.4 getSelectionStart .................................................................................................... 19
3.3.3.5 getSelectionEnd...................................................................................................... 19
3.3.3.6 getLineHeight ......................................................................................................... 20
3.3.3.7 getLineCount .......................................................................................................... 20
3.3.3.8 getHighLightColor / setHighLightColor ................................................................ 20
3.3.3.9 GetXYCursor ......................................................................................................... 21
3.3.4 Label Utils ...................................................................................................................... 22
3.3.4.1 setEllipsize ............................................................................................................. 22
3.3.4.2 resetEllipsize .......................................................................................................... 22
3.3.4.3 setSingleLIne.......................................................................................................... 22
3.3.4.4 setLines .................................................................................................................. 23
3.3.4.5 setMarqueeRepeat .................................................................................................. 23
3.3.4.6 Stop or run the horizontal scrolling ........................................................................ 23
3.3.4.7 setShadowLayer ..................................................................................................... 23
4 B4J JavaObject ........................................................................................................................... 24
4.1 B4J JavaObjec Methods ..................................................................................................... 24
4.1.1 CreateEvent .................................................................................................................... 24
4.1.2 CreateEventFromUI ....................................................................................................... 26