firemonkey

Best way to implement MVVM bindings (View <-> ViewModel) in Delphi? [closed]

≡放荡痞女 提交于 2019-12-06 22:11:35
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . For a multi-platform application using native components, the standard Delphi approach is no longer sufficient. So far our structure had only to parts: GUI (Forms) and Business logic. We now need to split the "Forms" part into two, which in a MVVM context would be View and

Firemonkey android read_phone_state runtime permission asks to get IMEI

吃可爱长大的小学妹 提交于 2019-12-06 22:08:30
问题 How can I get read_phone_state permission at runtime to get IMEI number? if not HasPermission('android.permission.READ_PHONE_STATE') then begin //ASK AND GET PERMISSION ? end; function TForm1.HasPermission(const Permission: string): Boolean; begin //Permissions listed at http://d.android.com/reference/android/Manifest.permission.html {$IF RTLVersion >= 30} Result := TAndroidHelper.Context.checkCallingOrSelfPermission( {$ELSE} Result := SharedActivityContext.checkCallingOrSelfPermission( {

Firemonkey ScrollBox Bug

房东的猫 提交于 2019-12-06 16:33:22
问题 We are experiencing what seems to be a strange bug in Firemonkey's ScrollBox component (since TGrid inherits from TScrollBox it also affects all grids). On some ouf our development machines, everything works fine, while on others the bug occurs. We failed to detect any pattern between the systems (we checked OS, graphics hardware, DirectX version). Reproduction: Create a new FireMonkey application. Place a TScrollBox on the form. Add a button to the scrollBox and set its vertical position to

Using Livebindings to Assign Several Field Values to an FMX MetropolisUI TListBox Item.Text

佐手、 提交于 2019-12-06 16:20:31
I am coding a FMX Metropolis UI application and trying to assign two field values of type string to the Item.Title member of TListBox by LiveBindings technology (using expression engine). When I use a TBindList in the following way: object BindList1: TBindList Category = 'Lists' ControlComponent = ListBox1 SourceComponent = BindSourceDB1 FormatExpressions = < item ControlExpression = 'Text' SourceExpression = 'FieldByName("name1").Text + " " + Field' + 'ByName("name2").Text' end> FormatControlExpressions = <> ClearControlExpressions = <> end It assigns the 'name1 name2' string to the member

Delphi XE7: How to get native statusbar behavior in iOS 7?

风流意气都作罢 提交于 2019-12-06 15:59:34
In iOS 7 the default behavior of the statusbar is to be transparent, but that seems impossible in Delphi XE7. The statusbar always get the same color as the mainform (which was the default behavior in iOS 6). The Mainform.borderstyle controls if the statusbar is shown or not, but I cannot find any way to set it transparent. I have tried setting UIViewControllerBasedStatusBarAppearance and UIStatusBarStyle in the info.plist and tried to call TUIApplication.wrap(TUIApplication.OCClass.sharedApplication).setStatusBarStyle(UIStatusBarStyleBlackTranslucent) but it remains solid. Did anyone succeed

Issue with GCM Push notification service DELPHI XE6

余生长醉 提交于 2019-12-06 15:40:57
问题 I'm developing a GCM Push notification on delphi xe6. I use the code in this post https://stackoverflow.com/questions/21466094/start-android-activity-before-passing-the-gcm-intent (using the standars components in the AndroidManifest.xml) for my own app and I manage to use the service to receive the notification even if the app is not running. But I have a problem when I receive the notification and that is i cant capture the onclick event, so my apps open (great) but it doesn't do the desire

Prevent firing events while scrolling TVertScrollBox

ぐ巨炮叔叔 提交于 2019-12-06 13:58:47
Normally, while scrolling the contents of a "scroll box", no event functions are fired from the sub-components of a scroll box, e. g. in native apps. But in FireMonkey, if a TVertScrollBox contains sub-elements like TRectangle (which I want to use as menu entries for a custom menu), scrolling the TVertScrollBox on Android with a finger sometimes triggers the event functions (like OnClick) of the sub-elements and this is very confusing for me and our customers - They don't want to tap a specific element while scrolling. In native apps this never happens. I couldn't figure out how to prevent

Embeded DB for Firemonkey apps

随声附和 提交于 2019-12-06 13:22:52
问题 Creating a client application, want the whole DB to be embed in the software or in a single standalone dll (ie sqlite), not something like mysql. Whats built into XE2 which would work 'out of the box' and not need thirdparty tools? Other than TClientDataSet / xml files :) 回答1: You can use my SQLite wrapper (also some more info in my blog) which supports multiple platforms. In Windows you'll need to deploy sqlite3.dll with your application, there is no need for this on OSX. You can get sources

How to send email with attachment using default Android email app - Delphi XE7

∥☆過路亽.° 提交于 2019-12-06 13:18:45
Using code below which I found on another post , the email appears ready to send with the attachment, but when email is received, there is no attachment. Also, the email address has to be manually entered, it is not populated by the CreateEmail statement. I am sending from a gmail account. Anyone help please? procedure TForm1.CreateEmail(const Recipient, Subject, Content, Attachment: string); var Intent: JIntent; Uri: Jnet_Uri; AttachmentFile: JFile; begin Intent := TJIntent.Create; Intent.setAction(TJIntent.JavaClass.ACTION_SEND); Intent.setFlags(TJIntent.JavaClass.FLAG_ACTIVITY_NEW_TASK);

Delphi FireMonkey - Setting Wallpaper on Win 10 does not work when deployed as APPX

冷暖自知 提交于 2019-12-06 13:12:54
I have created a simple application using Delphi 10.2 Tokyo (using FireMonkey) that displays images and allows you to set the desktop wallpaper for a selected image. The main code that sets the desktop wallpaper is: class procedure TUtilityWin.SetWallpaper(AFileName: String); begin SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, pChar(AFileName), (SPIF_UPDATEINIFILE OR SPIF_SENDWININICHANGE)); end; While this works great when the application runs on the desktop (as a standalone install), it fails when run as an APPX (during the certification process) of submitting to the Windows 10 App Store.