firemonkey

Does Delphi XE2 FireMonkey support Indy for cross-platform apps?

空扰寡人 提交于 2019-12-19 06:05:24
问题 Looking at the new Delphi XE2 with Firemonkey. Considering that it compiles for Windows, Mac OSX and iOS, VCL components are useless in a FireMonkey application. My question is: Is there/will there be an Indy Firemonkey Edition? Cause I seriously need the IdHTTP.Post(); . If not, is there a way to do this in FireMonkey? I have been googling for quite awhile now, not finding anything. :S 回答1: VCL means Visual Component Library . There's nothing about Indy that is "visual" (meaning "seen at

How to parse specified value from JSON object in Delphi XE3?

半腔热情 提交于 2019-12-19 03:17:19
问题 My JSON object looks like this: { "destination_addresses" : [ "Paris, France" ], "origin_addresses" : [ "Amsterdam, Nederland" ], "rows" : [ { "elements" : [ { "distance" : { "text" : "504 km", "value" : 504203 }, "duration" : { "text" : "4 uur 54 min.", "value" : 17638 }, "status" : "OK" } ] } ], "status" : "OK" } I will need the "504 km" value from distance. How can i do this? 回答1: You can use the DBXJSON unit, included since Delphi 2010. Try this sample uses DBXJSON; {$R *.fmx} Const

How do you style the non-client area in a Firemonkey FM2 application in Delphi XE3

独自空忆成欢 提交于 2019-12-18 13:28:33
问题 I previously asked this question in the Delphi XE2 timeframe, and the answer then was a pretty ugly hack. Now Delphi XE3 supports non-client theming, according to the official release notes. How do you do it in Delphi XE3 in Firemonkey FM2? I believe it must be something to do with the style-book, but I can't figure it out. The form itself has an "EnableBorderStyling" property which I set to true, and I am thinking I must have to load a style that contains some nonclient theme data, but I can

Opening URL within ios application

泪湿孤枕 提交于 2019-12-18 08:46:32
问题 I need to open a webpage with safari in my iOS application. With XE2 there was iphoneall unit, which exposed UIApplication. XE4 doesn't use FPC anymore, so I can't use that. Embarcadero documentation says I can use SDKs only with C++ or using delphi interfaces (and still, macapi is for OSX only, not iOS). So, it seems that there is no interface for UIKit framework?! Another solution I tried was: _system('open http://www.google.com'); But that had no affect at all! Is there any other ways to

Best strategy for too many Elements in FireMoneky TListView Item [duplicate]

佐手、 提交于 2019-12-18 05:24:27
问题 This question already has an answer here : Create a customized Item Appearance for ListView Delphi XE7 (1 answer) Closed 4 years ago . Believe me I did my homework before reaching out for help. I spent last 3 days searching and reading but I couldn't come to a solution. So any help will be highly appreciated. My task is to have a ListView connected to a Dataset where the ListView Item is of the following structure: Bear in mind that Elements 4, 6, & 8 are of fixed values & Color (i.e. labels)

Delphi android application is raising issue in Lennova A5000 mobile

三世轮回 提交于 2019-12-18 05:07:12
问题 I'm using Delphi 10 Seattle trail version for developing mobile application. And I tried to create new android mobile application which contains only TEditBox. And then compiled by setting the option as "Release". Then, generated the .apk file and then provided the file to the user. And when the user tried to click the edit box, the application raises the error message that " The Appname is not responding ". The user is using the Lennova A5000 and the Os is Android 5.0.2. And the same

How to get currently logged in username?

≯℡__Kan透↙ 提交于 2019-12-18 04:40:47
问题 How do you get the currently logged in username in a Firemonkey Delphi project? I'm targeting both Windows and Mac. I have XE2, but I suppose any version solution is fine because I will upgrade if needed. 回答1: For Windows you can use the GetUserName WinAPi function, for OSX you can use the NSUserName and/or NSFullUserName methods. Try this sample for OSX {$APPTYPE CONSOLE} {$R *.res} uses Macapi.CoreFoundation, Macapi.Foundation, System.SysUtils; function NSUserName: Pointer; cdecl; external

How to save a file on Android? (Firemonkey)

时间秒杀一切 提交于 2019-12-18 04:40:07
问题 How can I save a file locally on an Android device, using Delphi (XE5, Firemonkey)? Something as simple as Memo.Lines.SaveToFile('test.txt') does not seem to work. It results in the following error message: "Cannot create file "/test.txt". Not a directory." 回答1: According to the document Creating an Android App, get the documents path like this: System.IOUtils.TPath.GetDocumentsPath + System.SysUtils.PathDelim + 'myfile'; 回答2: Instead of using System.SysUtils.PathDelim , you may use System

Show login form before main form

 ̄綄美尐妖づ 提交于 2019-12-17 20:43:56
问题 I'm having problems with the navigation between the forms. I have created an Android Firemonkey Mobile Application using Delphi XE5. I currently have a Login Form and the Main Form, now I want advice on how to handle the Login Form to appear before the Main Form. 回答1: In the Project Options, under forms, select the LogonForm to be auto-created, and move all other forms out of the list. Now when you start your application, the Logon form will show as the first (and only) form. Once logged on,

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

此生再无相见时 提交于 2019-12-17 16:33:58
问题 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? 回答1: 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