firemonkey

Google AdMob TBannerAd LoadAd exception after upgrading to Delphi v10.2.3

流过昼夜 提交于 2019-12-12 20:09:31
问题 My application was originally written using Delphi v10.2.2 and TBannerAd worked just fine. Without any code changes and after upgrading Delphi to v10.2.3 (by installing over the existing v10.2.2 using the ISO without changing anything in the installation dialogs), calling TBannerAd's "LoadAd" method started triggering this exception: Project myproject.apk raised exception class EJNIException with message 'java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml

TwebBrowser Zoom/Gesture is not working for firemonkey/iOs in XE4 when open a pdf file

故事扮演 提交于 2019-12-12 14:05:07
问题 I want to display PDF within iOS application, so far the only way I find is open it in TwebBrowser. A.It is displaying in "fit to page width" zoom as default B.There is no "zoom" function WebBrowser1.Navigate(file://mypdf.pdf') How to I want to change the zoom after open the file (My solution encounter q#2) Make the zoom work (My solution encounter q#3) Make the gesture as work just like web page For #1: I chagne WebBrowser1.height/width in run-time, it will auto scale(zoom?) as "Fit to width

How to Get TCanvas DC in Firemonkey?

↘锁芯ラ 提交于 2019-12-12 13:15:20
问题 What I need I need to get the DC of a Firemonkey component's TCanvas . I need this to use Win API drawing functions not accessible through Firemonkey, mainly 100% control over font rendering. Obviously, this is a pure Windows Application, so any compatibilities with OSX isn't an issue. What I did I managed to get hold of the TForm's handle and convert it into a HWND, then getting the DC with GetDC(FmxHandleToHWND(Handle)); This is the OnPaint handler for the Character_PaintBox control. HWND

Hints on Firemonkey not displaying in Delphi Seattle

安稳与你 提交于 2019-12-12 12:43:26
问题 It is nice that Firemonkey got again the Hint property for controls, at least in Delphi Berlin and Seattle. However, the implementation seems to be a bit flawed yet. One weird issue is that the displaying of the Hint seems related to the form's BorderIcons property. If the BorderIcons are left with the default values (Maximize, Minimize, SystemMenu), the hint shows. But if I change some of the border icons, the hints don't show any more. I don't see any logic for it, so it looks like a bug. I

How to load custom cursor in Firemonkey?

一个人想着一个人 提交于 2019-12-12 11:11:30
问题 I need to use custom cursor in my Firemonkey desktop project. I can use LoadCursorFromFile in VCL project to load a custom cursor in my project. I have tried to do the same for Firemonkey but it is not loading the cursor. Is there any working way to achieve loading custom cursors in Firemonkey? uses Winapi.Windows; procedure Tform1.Button1Click(Sender: TObject); const mycursor= 1; begin Screen.Cursors[mycursor] := LoadCursorFromFile('C:\...\Arrow.cur'); Button1.Cursor := mycursor; end; 回答1: I

array of TRectangles in FMX

痞子三分冷 提交于 2019-12-12 10:20:45
问题 I am trying to extend the code from this from using one TRectangle to using multiple rectangles that can be added at runtime. In that example the code to click on and drag applies only to that one TRectangle Rectangle1 . I need to make it more general so it works on any recangle I add to the form (the rectangles won't be there at design time). I found this code to create a custom class and it works fine to create new rectangles. I can assign methods that run when they are clicked on but i

Calling objective C code block from delphi

点点圈 提交于 2019-12-12 10:06:23
问题 I'm trying to make background fetch work in my firemonkey application. I've gotten so far that my perfromFetchWithCompletionHandler gets called and downloads new information. The problem comes when I'm done with my fetch and need to call the completionHandler code block, the app hangs and I don't get any exception (that I can read at least) Setup: TBackgroundFetchResultHandlerC = procedure ( AResult : NSUInteger ); cdecl; .. .. procedure performFetchWithCompletionHandler(self : id; _cmd : SEL

Drawing on FMX canvas with WinApi functions

懵懂的女人 提交于 2019-12-12 09:53:28
问题 This question looks very simple, with VCL this is works fine (Image is TImage on VCL): procedure TFormMain.btnDrawBackgroundClick(Sender: TObject); var theme: HTHEME; begin theme := OpenThemeData(0, 'TASKDIALOG'); if theme <> 0 then try DrawThemeBackground(theme, Image.Canvas.Handle, TDLG_SECONDARYPANEL, 0, Image.ClientRect, nil); finally CloseThemeData(theme); end; end; Question: what I should change to get the same effect with FMX (on Windows) 回答1: Based on this answer you simply can't do

Delphi Saving/Loading Dynamic Arrays Failed

不打扰是莪最后的温柔 提交于 2019-12-12 08:59:05
问题 I think this will look like ' do my homework ' kind of a question, but I'm still at the ' copy code, use it and try to understand it ' phase, and this is the most active thing I know of for posting questions of this theme. I have a record: type Card = record Name: string; Up,Right,Left,Down,Mark: Single; IDNumber: Integer; end; And array of that record: var ArrayCard: array of Card; And I wanted to know how can a dynamic array of this kind be stored/loaded to/from a file. Tried using this

Why are all the dialogs are using the “old” Android 2.x style?

只愿长相守 提交于 2019-12-12 07:16:39
问题 I am currently using RAD Studio XE7 and just wondering why all the dialogs in my Android app are using the "old" 2.x style? And how to force my Android app to use the 4.x style in all the dialogs like date picker and MessageDlg? Using StyleBook and modying the AndroidManifest.xml didn't work. Thanks in advance. 回答1: David I posted the answer to your same question on the Embarcadero Community Answers site: Why all the dialogs are using the "old" Android 2.x style? I alerted our development