Tag: firemonkey

I Just Don’t GetIt

In case you were wondering, GetIt appears to be down at the moment.  I went to take 5 minutes to update a bug report, and I needed to install FmxLinux to do so, only to see:
I guess it will have to wait.  This is the problem of automating everything.  You become reliant on services that […] … Read More

Read More

Delphi 10.3 Android Remote Service crash when binding

I tried to build an APP with a remote service, and the service will communicate to other APP that I would like to check it still running. I reference the FMX.Remote Service Demo Sample create a Multi-Device project and a Android Remote Service project, and add some code to create RemoteServiceConnection and call BindService procedure. But APP crash when it call BindService, then I tried to build Sample but also crash when I press Bind button. I build the Sample on Mi Pad 4, Oppo R9sk, HUAWEI MediaPad M5 lite, and Mi 6, are all the same result, and Mi 6 report the message: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.embarcadero.AppRemoteHost-EOCjVTj9dNHejm_JDi44nw==/base.apk"], nativeLibraryDirectories=[/data/app/com/embarcadero.AppRemoteHost-EOCjVT9dNHejm_JDi44nw==/lib/arm, /data/app/com.embarcadero.AppRemoteHost-EOCjVTj9dNHejm_JDi44nw==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]] couldn't find "libProxyAndroidService.so" at at java.lang.Runtime.loadLirary0(Runtime.java:1012) at java.land.System.loadLibrary(System.java:1669) Anyone can help?
Read More

Virtual Keyboard does not appear for TFloatColumn editor of FMX.Grid.TStringGrid on popup form in FireMonkey Android app

The main form of my FireMonkey application includes a TStringGrid with a TFloatColumn for entering values and a TGylph column for implementing a "button". When I detect the "button" being clicked I show a new form, non-modal of course, which also contains a TStringGrid with a TFloatColumn for entering values. The problem I'm having is that clicking on the cell for the TFLoatColumn of the main form opens the virtual keyboard, but clicking on the cell for the TFloatColumn of the popup form does not. Both grids have identical settings (apart from the name) and the TFloatColumns also have identical settings, so why doesn't the virtual keyboard appear?
Read More

Turn off Virtual Keyboard for one control in FireMonkey Android app

What's the best way to turn off the virtual keyboard for a particular FMX.Edit.TEdit control? Is it to use VKAutoShowMode := TVKAutoShowMode.Never; in the OnEnter event and VKAutoShowMode := TVKAutoShowMode.DefinedBySystem; in the OnExit event? I'm not entirely happy with this approach, as if something doesn't go according to plan, the virtual keyboard is hidden for every control in the app. Or just use Keyboard.HideVirtualKeyboard; in the OnEnter event? This sort of works, but if you click into the control a second time, the keyboard appears. I can see the control has a KeyboardType property, but None is not one of the available choices. Am I missing something here? EDIT: I cannot set ReadOnly to true, as it is being used for capturing the text from a barcode scanner. EDIT: Since VKAutoShowMode := TVKAutoShowMode.Never; works the majority of the time I'll just continue to use that method, but add extra event handlers to use VKAutoShowMode := TVKAutoShowMode.DefinedBySystem; when other edit controls get the focus.
Read More

Melbourne Meeting – September 2020

Monday 21 September at 6 for 6:15pm start. ONLINE MEETING – WE WILL NOT BE MEETING IN PERSON We will meet online, instead of meeting at the Shed. Malcolm Groves from Code Partners will show his CodeBindings open source library. CodeBindings : Visual LiveBindings with a lot less of the Visual “Visual Livebindings were introduced into Delphi and C++Builder nearly 10 years ago as a way for both VCL and FMX apps to bind data to visual controls.… Continue reading ›
Read More

How to make Firemonkey TWebBrowser load over fifty photos in one html file [closed]

I have an html file containing over 50 photos, each in an <img> tag. The file is correctly showing in Microsoft Edge as well as in Google Chrome. However, in FireMonkey TWebBrowser, only about 30 photos can be seen. Others just show the "alt" text. Is there anyway to improve this so all photo files can be seen? Please note, in Delphi 10.3, there are two different controls both in the name of TWebBrowser. The one I am using is the FireMonkey TWebBrowser. My test page is too large (with 100 hundred photos each in an img tag) to present here. I also tried it in Delphi 10.4 which is just released two months ago. But the result was the same: not all photos can be seen.
Read More

Strange characters in Listview

I have this code for an Android project for autoheight the Listview Text. Everything works fine with fix height. When I activate this code LText.Height := ListView1.getItemTextHeight(LText)+10; the autoheight works fine but came with that strange characters on Bold and some times a “Duplicates not allowed” error message.
In Windows works fine but on Android I have this.

    for i := 0 to FDMemTable1.RecordCount -1 do
      begin
        UName := (FDMemTable1.FieldByName('username').Value);
        Descr := (FDMemTable1.FieldByName('descr').Value);
        Ext := (FDMemTable1.FieldByName('ext').Value);
        Url := (FDMemTable1.FieldByName('vurl').Value);
        FCanUpdate := False;
        LItem := ListView1.Items.Add;
        LItem.Data['UName'] := UName;
        LItem.Data['Descr'] := Descr;
        LItem.Data['Ext'] := Ext;
        LItem.Data['Url'] := Url;
        FCanUpdate := True;
        LItem.Adapter.ResetView(LItem);
        FDMemTable1.Next;
      end;
    ListView1.EndUpdate;
end;

procedure TForm7.ListView1UpdatingObjects(const Sender: TObject;
  const AItem: TListViewItem; var AHandled: Boolean);
var
  h: integer;
  LText: TListItemText;
begin
  h := 2;
  LText := AItem.Objects.FindObjectT<TListItemText>('UName_text');
  if LText = nil then
    begin
      LText := TListItemText.Create(AItem);
      LText.Name := 'UName_text';
      LText.PlaceOffset.X := 18;
      LText.PlaceOffset.Y := h;
      LText.TextColor := TAlphaColorRec.Black;
      LText.TextAlign := TTextAlign.Leading;
      LText.TextVertAlign := TTextAlign.Leading;
      LText.Font.Size := 14;
      LText.Font.Style := [TFontStyle.fsBold];
    end;
  LText.Width := (Sender as TListView).Width - 18;
  LText.Text := AItem.Data['UName'].AsString;
  LText.Height := 22;
  h := Round(h + LText.Height +7);

  if AItem.Data['Descr'].AsString <> '' then
  begin
    LText := AItem.Objects.FindObjectT<TListItemText>('Descr_text');
    if LText = nil then
      begin
        LText := TListItemText.Create(AItem);
        LText.Name := 'Descr_text';
        LText.PlaceOffset.X := 18;
        LText.PlaceOffset.Y := h;
        LText.TextColor := TAlphaColorRec.Black;
        LText.TextAlign := TTextAlign.Leading;
        LText.TextVertAlign := TTextAlign.Leading;
        LText.WordWrap := True;
        LText.Font.Size := 13;
        LText.Font.Style := [];
      end;
    LText.Width := (Sender as TListView).Width - 20;
    LText.Text := AItem.Data['Descr'].AsString;

//    LText.Height := ListView1.getItemTextHeight(LText)+10;

    LText.Height := 30;

    h := Round(h + LText.Height + 5);
  end;
  AItem.Height := h;
  AHandled := True;
end;

The screenshot from my phone.

What goes wrong with this ???

Read More

Read More

Added TButton won’t align with previous TButtons after upgrade from 10.3.1 to 10.3.3 in Android

I'm using FireMonkey to create my Android application. I have 6 TButtons on a panel and want to insert a 7th. The 6 were positioned under CX 10.3.1 on an android device. I recently upgraded to CX 10.3.3, and wanted to insert a 7th TButton in that row -- there is room -- but the installed result on the android device has an older button and the new one stepping on each other. I then tried to take the end (old) TButton and place it below the row of 6 and put the new TButton where the old one was and align the row using Space equally and I still get a mess. Has there been a change in buttons? The new button is from the Standard Palette. It has been a while since I wrote the original code, but was there a FireMonkey based TButton before that I should be using? And if so, where is it located? Any help would sure be appreciated.
Read More

Target Android API 29 on Delphi 10.3.3

I have the Delphi 10.3.3, and I have some apps on Google Play that I update frequently. The case is that on Nov 2, I will have to target API 29 on my apps. The thing is that Delphi 10.3.3 does not do this automatically. So this is the list of things I think I have to do and I do not know how to do them: Download the new API 29 with the Android SDK Manager of the Delphi (which I don't find) Edit the SDK Manager configuration to install well the API 29 Edit the Android Manifest file to target API 29 The case is that I do not know how to edit the AndroidManifest file through Delphi because I think I need to do some steps before. (I need to know how to edit it, I do not find this info anywhere) I need to install the API 29, configure it well on Delphi, and edit AndroidManifest.xml in Delphi. I'll appreciate your answers. I need help :-)
Read More