Android Programming Press on the image to return to the main documentation page.

IMLibrary v1.04

Written by Ivano Monti

List of types:

ClassMyBattery
ClassMyButton
ClassMyDialog
ClassMyIntent
ClassMyLayout
ClassMyProcess
ClassMySensor
ClassMyServerClient
ClassMyToolBar
ClassMyXml
SensorData

ClassMyBattery


Events:

None

Members:


  BatteryCharging As Boolean

  BatteryIntent As IntentWrapper

  BatteryLevel As Int

  BatteryScale As Int

  Class_Globals As String

  Initialize As String

  IsInitialized As Boolean

Members description:

BatteryCharging As Boolean
BatteryIntent As IntentWrapper
BatteryLevel As Int
BatteryScale As Int
Class_Globals As String
Initialize As String
IsInitialized As Boolean
Tests whether the object has been initialized.

ClassMyButton


This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Permissions:

android.permission.BIND_WALLPAPER
android.permission.SET_WALLPAPER

Events:

None

Members:


  Base64StringToImage (s As String) As BitmapWrapper

  CenterImageToActivity (v As ActivityWrapper, bmp As BitmapWrapper) As String

  CenterImageToView (v As ConcreteViewWrapper, bmp As BitmapWrapper) As String

  Class_Globals As String

  GradienActivity (v As ActivityWrapper, col1 As Int, col2 As Int) As String

  GradientCanvasObject (cvs As CanvasWrapper, rct As RectWrapper, color1 As Int, color2 As Int, Types As Int, redius As Int) As String

  imageDrawable (bmp As BitmapWrapper) As BitmapDrawable

  ImageEmpty As BitmapWrapper

  Initialize As String

  IntToDIP (Integer As Int) As Int

  IsInitialized As Boolean

  NewButtonComplementary (p As PanelWrapper, Lbn As LabelWrapper, bmpstring As String, col1 As Int, col2 As Int, Gradient As Boolean, types As Int, bord As Boolean) As String

  NewButtonRec (p As PanelWrapper, lbn As LabelWrapper, bmpstring As String, col1 As Int, col2 As Int, Gradient As Boolean, types As Int, bord As Boolean) As String

  NewButtonRound (p As PanelWrapper, Lbn As LabelWrapper, bmpstring As String, col1 As Int, col2 As Int, Gradient As Boolean, types As Int, Arc As Int, bord As Boolean) As String

  ScaledBitmap (Original As BitmapWrapper, Width As Int, Height As Int) As BitmapWrapper

  TexResizeView (v As ConcreteViewWrapper, resize As Float, types As TypefaceWrapper) As String

Members description:

Base64StringToImage (s As String) As BitmapWrapper
return bitmap from string code base64
CenterImageToActivity (v As ActivityWrapper, bmp As BitmapWrapper) As String
Center image into Activity
_Example code
CenterImageToActivity(Activity,LoadBitmap(File.DirAssets,"Picture.png"))
CenterImageToView (v As ConcreteViewWrapper, bmp As BitmapWrapper) As String
Center image into View
_Example code
CenterImageToActivity(View,LoadBitmap(File.DirAssets,"Picture.png"))
Class_Globals As String
GradienActivity (v As ActivityWrapper, col1 As Int, col2 As Int) As String
color gradien activity
GradientCanvasObject (cvs As CanvasWrapper, rct As RectWrapper, color1 As Int, color2 As Int, Types As Int, redius As Int) As String
color gradien type 1 Top_bottom type 2 Bottom_top type 3 Right_left type 4 Left_right
imageDrawable (bmp As BitmapWrapper) As BitmapDrawable
return BitmapDrawable
_Example code
imageDrawable(bitmap)
ImageEmpty As BitmapWrapper
return image empty
Initialize As String
Initializes the object. You can add parameters to this method if needed.
IntToDIP (Integer As Int) As Int
return value int to dip
IsInitialized As Boolean
Tests whether the object has been initialized.
NewButtonComplementary (p As PanelWrapper, Lbn As LabelWrapper, bmpstring As String, col1 As Int, col2 As Int, Gradient As Boolean, types As Int, bord As Boolean) As String
button to panel

create a Button using the control Panel
parameters To be passed are simple
NewButtonComplementary(panel1,lb,nomepicture.png,Colors.Red,Colors.Black,true,1,false)
NewButtonRec (p As PanelWrapper, lbn As LabelWrapper, bmpstring As String, col1 As Int, col2 As Int, Gradient As Boolean, types As Int, bord As Boolean) As String
button to panel

create a Button using the control Panel
parameters To be passed are simple
NewButtonComplementary(panel1,lb,nomepicture.png,Colors.Red,Colors.Black,true,1,false)
NewButtonRound (p As PanelWrapper, Lbn As LabelWrapper, bmpstring As String, col1 As Int, col2 As Int, Gradient As Boolean, types As Int, Arc As Int, bord As Boolean) As String
button corners to panel

create a Button with rounded corners using the control Panel
parameters To be passed are simple
NewButtonComplementary(panel1,lb,nomepicture.png,Colors.Red,Colors.Black,true,1,4,false)
ScaledBitmap (Original As BitmapWrapper, Width As Int, Height As Int) As BitmapWrapper
Returns the resized image
_Example code
ScalingPicture(LoadBitmap(File.DirAssets,"Picture.png"),250dip,250dip)
TexResizeView (v As ConcreteViewWrapper, resize As Float, types As TypefaceWrapper) As String
Resize % font size height view
_Example code
TexResizeView(Label1,30)

ClassMyDialog


This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Events:

None

Members:


  Class_Globals As String

  Dialog01 (ac As ActivityWrapper, caption As String, description As String, btn1 As ButtonWrapper) As String

  Dialog01System (ac As ActivityWrapper, title As String, message As String, bt1 As String) As Int

  Dialog02 (ac As ActivityWrapper, caption As String, description As String, btn1 As ButtonWrapper, btn2 As ButtonWrapper) As String

  Dialog02System (ac As ActivityWrapper, title As String, message As String, bt1 As String, bt2 As String) As Int

  Dialog03 (ac As ActivityWrapper, listV As ListViewWrapper) As String

  Dialog03System (ac As ActivityWrapper, listV As ListViewWrapper, title As String, bt1 As String, bt2 As String, bt3 As String) As Int

  Dialog04 (ac As ActivityWrapper, listV As ListViewWrapper, title As LabelWrapper) As PanelWrapper

  Dialog05 (ac As ActivityWrapper, titleText As String, Description As String, btn1 As ButtonWrapper, LstVline1 As String, LstVline2 As String, LstVline3 As String) As String

  DialogClose As String

  DialogVerify As Boolean

  Initialize (color1 As Int, color2 As Int) As String

  IsInitialized As Boolean

Members description:

Class_Globals As String
Dialog01 (ac As ActivityWrapper, caption As String, description As String, btn1 As ButtonWrapper) As String
Dialog1 simple dialog one button

dim s,ss as string
s = "title"
ss = "description"
dim btn as button
btn.initialize("button1")
btn.text = "Continue"
btn.TextSize = 12
btn.Typeface = Typeface.DEFAULT
Dialog1(Activity,s,s,btn)
Dialog01System (ac As ActivityWrapper, title As String, message As String, bt1 As String) As Int
Dialog02 (ac As ActivityWrapper, caption As String, description As String, btn1 As ButtonWrapper, btn2 As ButtonWrapper) As String
Dialog2 simple dialog two button

dim s,ss as string
s = "title"
ss = "description"
dim btn1, btn2 as button
btn1.initialize("button1")
btn1.text = "Cancel"
btn1.TextSize = 12
btn1.Typeface = Typeface.DEFAULT
btn2.initialize("button2")
btn2.text = "Save"
btn2.TextSize = 12
btn2.Typeface = Typeface.DEFAULT
Dialog1(Activity,s,s,btn1,btn2)
Dialog02System (ac As ActivityWrapper, title As String, message As String, bt1 As String, bt2 As String) As Int
Dialog03 (ac As ActivityWrapper, listV As ListViewWrapper) As String
Dialog3 simple dialog one listview

Dim bmp As Bitmap
bmp.InitializeMutable(64,64)
Dim cv As Canvas
cv.Initialize2(bmp)
Dim r As Rect
r.Initialize(0,0,32,32)
cv.DrawOval(r,Colors.ARGB(180,255,0,0),True,1)
Dim listV As ListView
listV.Initialize("ListV")
For i = 0 To 10
listV.AddSingleLine("Line ")
Next
dialog3(Activity,ListV)
Dialog03System (ac As ActivityWrapper, listV As ListViewWrapper, title As String, bt1 As String, bt2 As String, bt3 As String) As Int
Dialog04 (ac As ActivityWrapper, listV As ListViewWrapper, title As LabelWrapper) As PanelWrapper
Dim listV As ListView
Dim title As String
title = "Ciao"
listV.Initialize("ListV")
For i = 0 To 10
listV.AddSingleLine("Line ")
Next
dialog4(Activity,ListV,title)
Dialog05 (ac As ActivityWrapper, titleText As String, Description As String, btn1 As ButtonWrapper, LstVline1 As String, LstVline2 As String, LstVline3 As String) As String
Dialog5 is a dialog with title Description and one listview
DialogClose As String
close dialog
DialogVerify As Boolean
find open Dialog retrurn true
Initialize (color1 As Int, color2 As Int) As String
initialize class user two colors for gradient
dialog semi trasparent
color1 = Colors.ARGB(200,255,0,0)
color2 = Colors.ARGB(200,0,0,0)
result dialog gradient red to black
IsInitialized As Boolean
Tests whether the object has been initialized.

ClassMyIntent


Permissions:

android.permission.ACCESS_FINE_LOCATION
android.permission.SEND_SMS
android.permission.CALL_PHONE

Events:

None

Members:


  Class_Globals As String

  Initialize As String

  IsInitialized As Boolean

  MapIntent (address As String) As String

  message1 As String

  message2 As String

  OpenCalendar As String

  OpenCamera As String

  OpenContact As String

  OpenCrome As String

  OpenFacebook As String

  OpenGallery As String

  OpenGmail As String

  OpenGooglePiu As String

  OpenLinkedin As String

  OpenPhone As String

  OpenPhoneMail As String

  OpenSMS As String

  OpenTwitter As String

  OpenWhatsUp As String

  OpenXperiaAlbum As String

  OpenXperiaSMS As String

  PhoneIntent (Phone As String) As String

  SendWhatsUp As String

  SmsIntent (numbersms As String) As String

  SosIntent (Code As String) As String

  WebIntent (linkUrl As String) As String

Members description:

Class_Globals As String
Initialize As String
Initializes the object. You can add parameters to this method if needed.
IsInitialized As Boolean
Tests whether the object has been initialized.
MapIntent (address As String) As String
apre google map app
message1 As String
message2 As String
OpenCalendar As String
avvia calendar
OpenCamera As String
avvia camera
OpenContact As String
avvia agenda
OpenCrome As String
avvia crome
OpenFacebook As String
avvia facebook
OpenGallery As String
avvia gallery
OpenGmail As String
avvia gmail
OpenGooglePiu As String
avvia google +
OpenLinkedin As String
avvia linkedin
OpenPhone As String
avvia telefono
OpenPhoneMail As String
avvia la app mail del telefono
OpenSMS As String
avvia la app degli sms
OpenTwitter As String
avvia twitter
OpenWhatsUp As String
avvia OpenWhatsUp
OpenXperiaAlbum As String
avvia la app dell'album su Xperia
OpenXperiaSMS As String
avvia la app degli sms su sony xperia
PhoneIntent (Phone As String) As String
avvia telefonata
SendWhatsUp As String
avvia OpenWhatsUp
SmsIntent (numbersms As String) As String
avvia navigatore e localizza punto gps per poi inviare coordinate su messaggio sms
SosIntent (Code As String) As String
avvia telefonata al centro 118,115,113,112,911
WebIntent (linkUrl As String) As String
avvia pagina web

ClassMyLayout


Events:

None

Members:


  Class_Globals As String

  EditTextFontSize (v As ConcreteViewWrapper) As String

  Initialize As String

  IsInitialized As Boolean

  LabelFontSize (v As ConcreteViewWrapper) As String

  SettingLayout (ac As ActivityWrapper) As String

  SettingLayoutLandscape (ac As ActivityWrapper) As String

  SettingLayoutPanel (ac As ActivityWrapper, pn As PanelWrapper) As String

  SettingLayoutPanelLandscape (ac As ActivityWrapper, pn As PanelWrapper) As String

  SettingLayoutPanelPortrait (ac As ActivityWrapper, pn As PanelWrapper) As String

  SettingLayoutPortrait (ac As ActivityWrapper) As String

Members description:

Class_Globals As String
EditTextFontSize (v As ConcreteViewWrapper) As String
EditTextFontSize

adjusts the font size based on the height of its container (Edittext)
EditTextFontSize(EditText1)
Initialize As String
Initializes the object. You can add parameters to this method if needed.
IsInitialized As Boolean
Tests whether the object has been initialized.
LabelFontSize (v As ConcreteViewWrapper) As String
LabelFontSize

adjusts the font size based on the height of its container (Label)
LabelFontSize(Label1)
SettingLayout (ac As ActivityWrapper) As String
SettingLayout

suits all the object contained in activity according to the display
SettingLayout(Activity)
SettingLayoutLandscape (ac As ActivityWrapper) As String
SettingLayout Landscape

suits all the object contained in activity according to the display
SettingLayout(Activity)
SettingLayoutPanel (ac As ActivityWrapper, pn As PanelWrapper) As String
SettingLayoutPanelLandscape (ac As ActivityWrapper, pn As PanelWrapper) As String
SettingLayoutPanel landscape

suits all the object contained in the panel according to the display
SettingLayoutPanel(Activity,Panel1)
SettingLayoutPanelPortrait (ac As ActivityWrapper, pn As PanelWrapper) As String
SettingLayoutPanel portrait

suits all the object contained in the panel according to the display
SettingLayoutPanel(Activity,Panel1)
SettingLayoutPortrait (ac As ActivityWrapper) As String
SettingLayout portrait

suits all the object contained in activity according to the display
SettingLayout(Activity)

ClassMyProcess


Permissions:

android.permission.READ_PHONE_STATE

Events:

None

Members:


  GetInfoApprossimatescreensize As String

  GetInfoDisplay As String

  GetInfoHeight As String

  GetInfoScale As String

  GetInfoWidght As String

  GetOrientationsActivity (ac As ActivityWrapper) As String

  Initialize As String

  IsInitialized As Boolean

  ReadAccountPhone As Object

  ReadContactsSim As CursorWrapper

Members description:

GetInfoApprossimatescreensize As String
return approssimatescreensize activity
GetInfoDisplay As String
return info display width, height,scale,approssimatescreensize
GetInfoHeight As String
return height activity
GetInfoScale As String
return scale activity
GetInfoWidght As String
return width activity
GetOrientationsActivity (ac As ActivityWrapper) As String
return type Orientations
Initialize As String
IsInitialized As Boolean
Tests whether the object has been initialized.
ReadAccountPhone As Object
read list account (goole,whatsapp,videb,skype,mail ect ect
ReadContactsSim As CursorWrapper
read list contacts sim

ClassMySensor


This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Events:

None

Members:


  act As ActivityWrapper

  act_Pause (UserClosed As Boolean) As String

  act_Resume As String

  Class_Globals As String

  Initialize (acti As ActivityWrapper, FirstTime As Boolean) As String

  IsInitialized As Boolean

  result As List

  SensorsLabels As Map

  SensorsMap As Map

Members description:

act As ActivityWrapper
act_Pause (UserClosed As Boolean) As String
to be called when activity pauses
act_Resume As String
to be called when activity resume
Class_Globals As String
Initialize (acti As ActivityWrapper, FirstTime As Boolean) As String
Initializa object sensor
IsInitialized As Boolean
Tests whether the object has been initialized.
result As List
SensorsLabels As Map
SensorsMap As Map

ClassMyServerClient


Permissions:

android.permission.INTERNET
android.permission.ACCESS_WIFI_STATE
android.permission.ACCESS_NETWORK_STATE

Events:

None

Members:


  ConnectServer As String

  DisconnectServer As String

  Initialize (port As String, ServerIp As String) As String

  IsInitialized As Boolean

  Result() As Byte

  send_data (data As String) As String

Members description:

ConnectServer As String
DisconnectServer As String
Initialize (port As String, ServerIp As String) As String
IsInitialized As Boolean
Tests whether the object has been initialized.
Result() As Byte
send_data (data As String) As String

ClassMyToolBar


This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Events:

None

Members:


  Class_Globals As String

  ClearToolBar As String

  HideToolBar As String

  Initialize (ToolBarName As String) As String

  IsInitialized As Boolean

  ItemClear As String

  SetColor (col() As Int) As String

  title As List

  ToolBar (Container As PanelWrapper, position As Int, Height As Int, btn() As ButtonWrapper, col() As Int) As String

Members description:

Class_Globals As String
ClearToolBar As String
HideToolBar As String
Initialize (ToolBarName As String) As String
Initializes the object. You can add parameters to this method if needed.

position 0 = top 1 = center, 2 = bottom
IsInitialized As Boolean
Tests whether the object has been initialized.
ItemClear As String
SetColor (col() As Int) As String
title As List
ToolBar (Container As PanelWrapper, position As Int, Height As Int, btn() As ButtonWrapper, col() As Int) As String

ClassMyXml


Permissions:

android.permission.INTERNET
android.permission.WRITE_EXTERNAL_STORAGE

Events:

None

Members:


  Class_Globals As String

  DeleteXmlFile As Boolean

  Initialize (xPathExternal As String, xPathInternal As String, xNamefile As String, xNameNode As String, mode As Int) As String

  IsInitialized As Boolean

  ls() As List

  Namefile As String

  NameNode As String

  PathExternal As String

  PathInternal As String

  UpdateList (url As String) As String

  VerifyXmlFile As Boolean

Members description:

Class_Globals As String
DeleteXmlFile As Boolean
delete file xml
Initialize (xPathExternal As String, xPathInternal As String, xNamefile As String, xNameNode As String, mode As Int) As String
Initialize xml metod

This class helps you To download an xml File xml online (web) AND Return after parse all the values ​​In String format.
path disk + path folder + filename + namenode xml node1,node2,node3...,mode 1 = web 2 = new document
Initialize("www.ivanomonti.eu"/foglio.xml","XMLFolder","foglio.xnl","name,surname,phone,email,url,facebook,google+",0)
IsInitialized As Boolean
Tests whether the object has been initialized.
ls() As List
Namefile As String
NameNode As String
PathExternal As String
PathInternal As String
UpdateList (url As String) As String
updates the xml file with the one in the web
VerifyXmlFile As Boolean
verify exists file xml, return value boolean true

SensorData


Events:

None

Members:


  Initialize

  IsInitialized As Boolean

  Name As String

  ThreeValues As Boolean

Members description:

Initialize
Initializes the fields to their default value.
IsInitialized As Boolean
Tests whether the object has been initialized.
Name As String
ThreeValues As Boolean

Top