firemonkey

How to get device email address in Delphi 10

放肆的年华 提交于 2019-11-28 00:36:36
I'm trying to get my device email address, I used Java2OP to convert AccountManager class to object pascal. However, I tried to get the email address using the following code: jAm: JAccountManager; accounts: TJavaObjectArray<JAccountClass>; jAcc: JAccountClass; begin jAM := TJAccountManager.JavaClass.get(SharedActivityContext); accounts := TJavaObjectArray<JAccountClass>.Wrap(jAM.getAccountsByType(StringToJString('com.google'))); mmLog.Lines.Add('Length Accounts: ' + Inttostr(accounts.Length)); if accounts.Length > 0 then begin jAcc := accounts.Items[0]; mmLog.Lines.Add(jstringtostring( jAcc

XE4 ( Firemonkey + iOS Static Library) , Pascal conversion from Objective C Class?

时光怂恿深爱的人放手 提交于 2019-11-28 00:12:35
How to Conversion ? (Objective C Class -> Delphi XE4 ) and How to use Objective-C Class in static Library from Delphi XE ? Following is the my first trial. But It makes error. Objective C Source // objective C : test.h ---------------------------------------- @interface objc_test : NSObject { BOOL busy; } - (int) test :(int) value; @end // objective C : test.m ---------------------------------------- @implementation objc_test - (int) test :(int) value { busy = true; return( value + 1); } @end Here is wrong my conversion code. How to fix that ? Delphi Source // Delphi XE4 / iOS ----------------

Delphi XE5 right to left languages don't appear as they should in android

ε祈祈猫儿з 提交于 2019-11-27 23:32:53
as the title says , a text from a RTL language like persian or arabic doesnt show well in android for example the word "سلام" shows as "م ا ل س". this problem happens even in text inputs (which i thought they were native and native android textboxes support that) is there a way to fix this? As per LURD's suggestions. Download and use D.P.F Delphi Android Native Components and/or D.P.F Delphi iOS Native Components . That will fix the problem in XE7 and prior. According to the documentation with the Delphi XE8 beta the problem is fixed there as well. As a last resort (if you feel up to it),

AlphaBlend in FireMonkey

岁酱吖の 提交于 2019-11-27 21:55:02
问题 How can I change AlphaBlend value (of a form) in a FireMonkey Desktop Application? Well It's available in VCL Application but I couldn't find it in FireMonkey. Screenshot: 回答1: To make your form background semitransparent you should set form Transparency property to true and use Fill.Color with alpha value like $AAFFFFFF (with Fill.Kind = bkSolid ). in this case form border becomes invisible (at least in Delphi XE2 ) if you need to make all components at form semitransparent then place

Delphi XE2: Is it possible to create Mac GUI applications without FireMonkey?

淺唱寂寞╮ 提交于 2019-11-27 20:34:42
Using Delphi XE2, is it possible to create a Mac GUI application without using FireMonkey for the GUI? If so, what could be used and how would one go about it? In principle, it is possible. But you'd need to translate the Objective-C headers and classes exposed by Apple. That is a huge task, part of which has already been done by the FreePascal people or the Objective-Pascal people. But nothing prevents you from translating the (missing) headers yourself. You can call methods of a class and perform other functions using the pure C functions in the Objective-C runtime described on this page .

Firemonkey Grid Control - Styling a Cell based on a value (via the OnGetValue function call)

允我心安 提交于 2019-11-27 15:38:15
I am looking for recommended solution to style a TGrid cell that is being drawn by the OnGetValue call (that is called to paint the cells in view). For background, an excellent response by Mike, showed how to simply apply a tAlign property when the cell is created; but my next challenge is colouring the cell contents. Previous posting/answer The objective is to change the cell attributes (Font, style, colour etc...) of the value I am about to return as the cell "Value". In the example below; it would be applying a style to the OnGetValue "value" that is being returned. It may well be that we

How to close android app in Delphi-XE5 Firemonkey application?

无人久伴 提交于 2019-11-27 15:34:35
I have this piece of code procedure TFormMain.FormCloseQuery(Sender: TObject; var CanClose: Boolean); var msg: String; begin msg := 'Do you really want to exit?'; if MessageDlg(msg, TMsgDlgType.mtConfirmation, [TMsgDlgBtn.mbYes, TMsgDlgBtn.mbNo], 0) = mrNo then CanClose := False else CanClose := True; { FIXME: don't want to work on Android } end; It works perfectly on Windows. Application closes if I choose 'Yes'. However, application does NOT close on Android. What I am doing wrong? Having the application close when the last form is closed is a Windows thing. An Android app will keep running.

Create a customized Item Appearance for ListView Delphi XE7

梦想的初衷 提交于 2019-11-27 14:55:02
Im having a lot of trouble trying to create a customized item appearance for the TListView firemonkey control for Delphi XE7. What I want is to define my own "design" for what an item should be and use that item. For example : I would like to have an item with a Title(on top) - A Description(Middle) - A Date (Bottom) - Button(Right). I could not find any good documentation about this but i got some samples of how to create an TListView with muti details, but the problem is : that sample is not documented so is very hard to understand whats going on there. I would like to have a link or some

How to store images in FireMonkey?

守給你的承諾、 提交于 2019-11-27 08:25:46
问题 In VCL I had ImageList to store images. In FireMonkey there is no ImageList control. How do I store images in FireMonkey for later use? 回答1: To add images in FireMonkey (XE4) Project -> Resources and Images Then to access it: procedure TForm1.Button1Click(Sender: TObject); var InStream: TResourceStream; begin InStream := TResourceStream.Create(HInstance, 'MyPng', RT_RCDATA); try Image1.Bitmap.LoadFromStream(InStream); finally InStream.Free; end; end; Thanks to Peter Vonča 回答2: Because there

Messagedlg in Delphi xe7 android

余生长醉 提交于 2019-11-27 08:14:05
问题 I m just trying to execute a sample given during the installation of Delphi xe7, the MessageAlerts on android platform, unfortunately it does not working, it gives the following error message: Blocking Dialogs not implemented in this platform procedure TMessageAlertsForm.btnMultiButtonAlertClick(Sender: TObject); begin { Show a multiple-button alert that triggers different code blocks according to your input } case MessageDlg('Choose a button:', System.UITypes.TMsgDlgType.mtInformation, [