delphi-xe5

How to detect the termination of a program in Android?

孤人 提交于 2019-12-21 20:29:52
问题 When a Windows program terminates it calls event handlers like OnClose, OnDestroy and the destructor Destroy. When I want to save some INI settings these are the places to be. I wrote event handlers for all these events but they are not processed when I terminate the program. Does anyone know where I should place the code to be executed when an Android program terminates? I strongly suspect that this applies to iOS as well. Update Johan's answer works for Android as well, although reality is

How to create an android autostart application?

别说谁变了你拦得住时间么 提交于 2019-12-21 05:33:10
问题 How to create an android autostart application ? my app shows special date notifications and it must automatically start. tnx 回答1: You can use AlarmManager to schedule a time for when you'd like your application to launch. And you can use BroadcastReceiver to launch your app on a specific operating system event such as boot complete. 来源: https://stackoverflow.com/questions/22014178/how-to-create-an-android-autostart-application

Solve E2010 Incompatible types: 'AnsiChar' and 'Char'

风格不统一 提交于 2019-12-20 06:48:11
问题 I try to convert some code from D2007 to XE5 and got E2010 Incompatible types: 'AnsiChar' and 'Char' from this code TSetOfChar = Set of Char; var CharacterSet: TSetOfChar; s: String; for j := 1 to Length(s) do begin Include(CharacterSet, s[j]); // Error E2010 if not CaseSensitive then begin Include(CharacterSet, AnsiUpperCase(s[j])[1]); // Error E2010 Include(CharacterSet, AnsiLowerCase(s[j])[1]) // Error E2010 end end; Any suggestion for solution ? I think it is enough to handle AnsiStrings.

XE5 Android TBitmap.LoadFromStream fail inside a thread

為{幸葍}努か 提交于 2019-12-19 11:43:04
问题 I am creating a simple game for Android using Delphi XE5. I have a few resources, PNGs and Jpegs, I wanted to show a loading screen while my program loads up all the resources. But I found putting TBitmap.LoadFromFile, or TBitmap.LoadFromStream code inside a android thread, caused the App to quit immediately and return to Launcher, in debug mode Delphi don't even catch an exception. (The code works perfectly on Windows, and without thread on Android) I had to open logcat to see what went on,

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)

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

How can I prevent duplication of sub components in Firemonkey compound component?

房东的猫 提交于 2019-12-13 17:17:04
问题 I am trying to write a compound component which is derived from TDummy. The component source is: TMyObjectType=(otCube,otSphere); TMyGameObject=class(TDummy) private FObj:TCustomMesh; FMyObjectType: TMyObjectType; procedure SetMyObjectType(const Value: TMyObjectType); public constructor Create(AOwner:TComponent);override; destructor Destroy;override; property MyObjectType:TMyObjectType read FMyObjectType write SetMyObjectType; end; { TMyGameObject } constructor TMyGameObject.Create(AOwner:

What control should I use to create this UI in Delphi Firemonkey

隐身守侯 提交于 2019-12-13 15:09:04
问题 I am developing an application for mobile (android and ios) by Delphi xe5. I am willing to create this UI: I tried TListBox but image on left and right cant be set. I tried TListView but same problem as TListBox I tried TGrid with custom column , The problem of texts and images is solved but I can't create headers of each rows (it hasn't something like colspan) What I need is to create a custom control and repeat it. What is the best solution? Any solution or guide line will be appreciated.

Getting XML from response stream using Indy's IDTCPClient [closed]

▼魔方 西西 提交于 2019-12-13 11:25:13
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . This question is in direct relation to: Getting HTML from response stream using Indy's IDTCPClient I just need a version of get function to retrieve XML function TMyConnector.GETXML(aRawHeader: String): String; Using a idHTTP component, I could do the following HTTP.Request.ContentType := 'text/xml'; The header