firemonkey

FireMonkey TListview Search Reload Issue

时光怂恿深爱的人放手 提交于 2019-12-04 07:09:57
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 items reappear. This is crazy. And you clear the search again and all items appear. Hit the reload

Do FireMonkey controls have an equivalent to the VCL Invalidate() method?

荒凉一梦 提交于 2019-12-04 06:35:52
I'm creating some custom FireMonkey GUI controls. The components need to update in response to user interactions. VCL controls can call Invalidate() to be placed into a queue for repainting. Does FireMonkey have an equivalent method? FireMonkey controls have a Repaint() method, but AFAICT that forces the control to be repainted immediately. A queue type system would be more appropriate in some circumstances. relativ Control.InvalidateRect(RectF(0,0,width,height)); FireMonkey's TControl.Repaint ends up calling TPlatformWin.ReleaseWindow. If Form.Transparency is false then this method calls the

Changing TTextCell background colour at runtime XE4

╄→尐↘猪︶ㄣ 提交于 2019-12-04 06:35:37
问题 I worked through the example posted here as my starting point: Change background of TTextCell in a Firemonkey TGrid I have created a textcellstyle which references an image, and this is working well. When I run the program all the cells display the background image as expected. From the above link, Mike Sutton (I hope you're reading this, what would we do without your input!) writes (repeated here just to make it easier): "You can then set each of your cells StyleLookup properties to use it,

Get Android Device and OS Info in Firemonkey

≡放荡痞女 提交于 2019-12-04 06:20:33
问题 I know how to get app version, package name, udid for both Android and iOS But for iOS I can get more info. Code below returns model name, device name, os type and os version: string(Device.model.UTF8String);//Model name string(Device.name.UTF8String);//Device name string(Device.systemName.UTF8String);//Os type string(Device.systemVersion.UTF8String);//Os version Is it also possible to get this info For Android? I'm currently working in Delphi 10 Seattle. 回答1: I found what i'm looking for.

creating a firemonkey component

雨燕双飞 提交于 2019-12-04 05:56:37
问题 I'm working with Firemonkey in Delphi XE4 and I'm unable to create a new component using the menu item Component -> New Component. Whether the component is a VCL or Firemonkey component or whether I create a package first the result is the same. The Tool Palette in Delphi appears to be searched and gradually it closes leaving it empty of components and a component dialog box that says "No Items available" when it comes to selecting an ancestor component. I have two separate installations of

Delphi - New apps on Google Play must target Android 8 (API level 26) - PUSH notification in background

时光总嘲笑我的痴心妄想 提交于 2019-12-04 05:55:43
From August 2018, all new apps on Google Play must target Android 8 (API level 26) or higher, and from November 2018, all app updates on Google Play must of the same apps on Google Play. Right now the only way you have to upload a new App that target Android 8 is to edit the file AndroidManifest.template.xml and replace targetSdkVersion = "% targetSdkVersion%" by: Android: targetSdkVersion = "26" The problem is that from that moment the app has the restrictions introduced by Android O. The permissions considered as dangerous (camera, location, SMS, ...) will not be granted to the app by the

Delphi FMX Android app. How to open SMS window

时间秒杀一切 提交于 2019-12-04 05:14:40
问题 How I can open Short Message Service (SMS) window on Android phode with pretyped message text and recipient number. In manuals i found only Phone dialer PhoneDialerService.Call(edtTelephoneNumber.Text) which allow make call, but nothing about sending SMS messages. 回答1: See the class SMSManager on Android API. There is a sendTextMessage method that you can use: Try some code like this: uses Androidapi.Helpers, Androidapi.JNI.JavaTypes, Androidapi.JNI.Telephony; procedure TForm1.Button1Click

How to find Resolution under Delphi XE5

↘锁芯ラ 提交于 2019-12-04 04:19:45
I started to develop a game under Delphi XE5 for iOS. I have problem with the Resolution feature of the Firemonkey. When I open the screen and I check resolution on the iPhone I get 320x480. But the native resolution of the iPhone 4 and 5 is doubled. I found at official Delphi pages that FireMonkey is recalculating the screen by "Resolution" which is for Retina display 2. I think this is cool feature for regular apps, but when you start to do game and you want to manipulate with images by code it brings weird situations. My question is - is there way to find the actual Resolution value or at

How to adjust button size to fit the text in Delphi FireMonkey?

谁都会走 提交于 2019-12-04 03:48:24
I want button size (width and height) to be as small as possible, but I want it to fit the text. Any code example? Delphi XE4 FireMonkey Mobile Application. FireMonkey renders text via methods using TTextLayout class. We can access this methods via a class helper and then change the buttons size based on the information provided by the layout. uses FMX.TextLayout; type TextHelper = class helper for TText function getLayout : TTextLayout; end; function TextHelper.getLayout; begin result := Self.fLayout; end; procedure ButtonAutoSize(Button : TButton); var bCaption : TText; m : TBounds; begin

How to restrict minimum form's width in FireMonkey?

天涯浪子 提交于 2019-12-04 03:42:16
How do I restrict a minimum form's width in FireMonkey? It used to be so easy in VCL - it just had Max and Min constraints in forms properties. LaKraven Note for future readers: This will only work for versions below XE3 because the Fmx::Platform::TPlatform class was removed in XE3. Thanks to @Alain Thiffault for pointing it out in the comments. Original Post: Here's a more complicated (but more elegant) alternative solution, defining an entirely custom Form class from which you can inherit your own... unit FMX.ConstrainedForm; interface uses System.Classes, System.Types, System.UITypes, FMX