firemonkey

Mobile Application Error when loading from stream

送分小仙女□ 提交于 2019-12-06 10:06:53
I'm doing my first application for mobile in delphi and I have a problem and can not fix it. I have a procedure running in which I load a csv file from the resource. When I throw this procedure, on a mobile device (I could only test it on Android) I get this error: 'No mapping for the Unicode character exists in the Target multi-byte code page', no error in 32-bit Windows. Here is the code, Rad Studio XE6: procedure TContactos.LoadFromResource; var FicheroEntero, Linea: TStringList; rs: TResourceStream; I, pos: Integer; contacto : TContacto; begin FicheroEntero := TStringList.Create; Linea :=

Livebinding JSON objects and arrays

三世轮回 提交于 2019-12-06 08:40:04
Good evening all. I'm currently trying to get to grips with livebindings in Delphi as I'd like to refresh one of my current projects (complete rework from the base for the purpose of pushing to other platforms, optimizing performance and minimizing the code). I'm working with a web API which returns JSON data. The returned JSON format for one example call would look like this; { "response": { "ips": [ { "ip": "111.222.333.444", "classification": "regular", "hits": 134, "latitude": 0.0000, "longitude": 0.0000, "zone_name": "example.com" }, { "ip": "555.666.777.888", "classification": "regular",

XE4 Firemonkey on iOS prevent sleep mode

蓝咒 提交于 2019-12-06 08:19:38
问题 I am developing an app in Firemonkey XE4 for iOS and need to prevent the device from sleeping when there is no user input. I have found this command for xcode development: [application setIdleTimerDisabled:YES]; I presume there is an equivalent in FMX? Can anyone help please? Thanks Darryl 回答1: You can go straight to UIApplication, as so: uses iOSapi.UIKit; {$R *.fmx} procedure TForm6.Button1Click(Sender: TObject); var UIApp : UIApplication; begin UIApp := TUIApplication.Wrap(TUIApplication

FireMonkey XE5 - Livebinding - TGrid - Cell text aligment

放肆的年华 提交于 2019-12-06 08:00:44
I have a Firemonkey Desktop Application for Windows. I have a TGrid which I populate through a visual livebinding TBindSourceDB component. I want some columns to have text aligned to the right, as they are numerical values. I have tried through: onPainting event getting the TTextCell control by number of ColumnxRow typecasting it and setting TextAlignt property to the right None of those measures align the text to the right. I have tried to set it at runtime, unsuccessfully though, getting the TStyledControl and assigning procedures to the onApplyStyleLookup of the TTextCell . Any ideas on it?

FMX - Trayicon message handling

帅比萌擦擦* 提交于 2019-12-06 07:31:21
问题 I'm having trouble setting up a tray icon with FMX (XE3, Windows). I'm using the same code that can be found in countless threads but I did not get the message handling for the icon to work. To ilustrate I've created a testapp that sets up the TrayIcon data in the FormCreate and creates it with a button. It will show the correct icon and the correct tooltip, the TrayMessage procedure will never get called though. unit Unit2; interface uses System.SysUtils, System.Types, System.UITypes, System

Clear Firemonkey TListView search text

感情迁移 提交于 2019-12-06 06:40:29
ListView1.items.filter := nil; I understand that the above will clear the filter of a listview however if the Search is visible for the listview and something is typed into it, is there anyway of clearing the text from it? Dsm for I := 0 to ListView1.Controls.Count-1 do if ListView1.Controls[I] is TSearchBox then begin TSearchBox(ListView1.Controls[I]).Text := ''; end; (based on DocWiki!) Ricardo da Rocha Vitor Thanks @Dsm, by answer. I will just suggest a trick to get TSearchBox just one time and store in a variable. Now it is not necessary to loop through the TListView.Controls every time.

Delphi/Firemonkey Change iOS screen rotation at runtime

对着背影说爱祢 提交于 2019-12-06 05:27:29
问题 basically all I want to achieve is when a user is in a certain part of the App to change the screen rotation as needed, I have this working for Andriod and I can not see why it shouldn't work for iOS procedure TForm1.Button1Click(Sender: TObject); var ScreenService: IFMXScreenService; OrientSet: TScreenOrientations; begin if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, IInterface(ScreenService)) then begin OrientSet := [TScreenOrientation.soLandscape];//<- Break point

Check whether the SD card is available or not programmatically using Delphi [closed]

て烟熏妆下的殇ゞ 提交于 2019-12-06 04:33:11
问题 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 3 years ago . I'm developing mobile application using Delphi 10 Seattle. I need to check programmatically, whether the SD card is available in the device using Delphi 10 Seattle? I have found the some sample using JAVA. And please provide me some example using Delphi 回答1: Delphi does not define an interface for the Android

FireMonkey TListview Search Reload Issue

偶尔善良 提交于 2019-12-06 04:02:43
问题 TListview is not reloading properly when you do a search, clear the search and then reload the listview. Using XE5. Steps are: After project is running enter text into search. Clear search either clicking on "Clear" button or deleting the search text or clicking on the search "X" button. Press the "Reload" button. Nothing appears. You can step through the reload procedure and see that each item is added. However, the resulting list count is "0"!!! However, if you add the search text back the

Firemonkey TWebBrowser input alternative?

我的未来我决定 提交于 2019-12-06 03:32:38
问题 As Embarcadero said : " WebBrowser Does Not Accept Keyboard Input on Android On Android devices, the on-screen keyboard is not available in a TWebBrowser control. This means that a user cannot complete a web form, for example. The TWebBrowser control should be used for displaying information or documents. User interaction should be performed with FireMonkey controls. " Link This is very annoying if we have to use Clouds identification pages like Dropbox or Google Drive. Using Delphi XE5 with