1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Donation with Paypal!!!

    Go to your paypal account and send directly donation to [email protected]

    1 month - 10 $ - Standart VIP

    6 months - 20 $- Standart VIP

    1 year - 30 $- Standart VIP

    2 years - 50 $- Standart VIP

    Gold member for life - 150 $- Standart VIP

    High Vip (Standart VIP include) group please send PM or email to [email protected] for info

    After Donation please send email to [email protected]

  3. Donation Ways 2020


    Paysend
  4. Telegram
Dismiss Notice

Donation with Paypal!!!

Go to your paypal account and send directly donation to [email protected]

1 month - 10 $ - Standart VIP

6 months - 20 $- Standart VIP

1 year - 30 $- Standart VIP

2 years - 50 $- Standart VIP

Gold member for life - 150 $- Standart VIP

High Vip (Standart VIP include) group please send PM or email to [email protected] for info

After Donation please send email to [email protected]

Dismiss Notice
For open hidden message no need write thanks, thank etc. Enough is click to like button on right side of thread.

JavaImport for Android 1.5

Discussion in 'Delphi Tools,Freeware, Open Source' started by luiggikent, May 21, 2014.

  1. luiggikent
    Offline

    luiggikent DF Junior

    To import the Java classes for Android XE5 and XE6


    http://www.winsoft.sk/download/jimport.zip


    Example:

    Imported Android Toast API example:
    JToastClass = interface(JObjectClass)
        ['{DAE4EC72-C59E-4BFE-A623-9905932C39B1}']
        {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)
        ['{37D4A9A0-1DD6-413A-8548-82A45DA94840}']
        {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<JToastClass, JToast>)
      end;

    const
      TJToast_LENGTH_LONG: Integer = 1;
      TJToast_LENGTH_SHORT: Integer = 0;
     

Share This Page