» » JavaImport for Android 3.2 Full Source

 

JavaImport for Android 3.2 Full Source

Author: Loreal on 31-03-2016, 17:54, views: 633

0
JavaImport for Android 3.2 Full Source
JavaImport for Android 3.2 Full Source | 459 kB


Converts Java .jar files, .class files and folders to Delphi/C++ Builder units for Android.
To convert .jar file, rename it to .zip file, unzip it in some folder and then apply javaimport to this folder.

Imported Android Toast API example:
type
JToastClass = interface(JObjectClass)
['{51734059-CDB1-45F0-815E-5AB1AD644097}']
{Property methods}
function _GetLENGTH_LONG: Integer;
function _GetLENGTH_SHORT: Integer;
{Methods}
function init(context: JContext): JToast; cdecl;
function makeText(context: JContext; text: JCharSequence; duration: Integer): JToast; cdecl; overload;
function makeText(context: JContext; resId: Integer; duration: Integer): JToast; cdecl; overload;
{Properties}
property LENGTH_LONG: Integer read _GetLENGTH_LONG;
property LENGTH_SHORT: Integer read _GetLENGTH_SHORT;
end;


[JavaSignature('android/widget/Toast')]
JToast = interface(JObject)
['{BA203A75-C35C-4CF5-9AF4-9DCCA2C0EBBB}']
{Methods}
procedure cancel; cdecl;
function getDuration: Integer; cdecl;
function getGravity: Integer; cdecl;
function getHorizontalMargin: Single; cdecl;
function getVerticalMargin: Single; cdecl;
function getView: JView; cdecl;
function getXOffset: Integer; cdecl;
function getYOffset: Integer; cdecl;
procedure setDuration(duration: Integer); cdecl;
procedure setGravity(gravity: Integer; xOffset: Integer; yOffset: Integer); cdecl;
procedure setMargin(horizontalMargin: Single; verticalMargin: Single); cdecl;
procedure setText(resId: Integer); cdecl; overload;
procedure setText(s: JCharSequence); cdecl; overload;
procedure setView(view: JView); cdecl;
procedure show; cdecl;
end;


TJToast = class(TJavaGenericImport)
end;

const
TJToast_LENGTH_LONG = 1;
TJToast_LENGTH_SHORT = 0;

implementation

procedure RegisterTypes;
begin
TRegTypes.RegisterType('android.widget.Toast.JToast', TypeInfo(android.widget.Toast.JToast));
end;

initialization
RegisterTypes;
end.


Version 3.2

- added postfix number to equal class names


DOWNLOAD

Category: Delphi

Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.
Information
Would you like to leave your comment? Please Login to your account to leave comments. Don't have an account? You can create a free account now.