William23668
-
Content Count
121 -
Joined
-
Last visited
Posts posted by William23668
-
-
Hi
I was trying to add phone number in the address book demo like that hard coded but the number was never saved, why is that ?
Contact.Phones.AddPhone('Home', '767867679678');
procedure TForm1.ActionAddContactExecute(Sender: TObject); var Contact: TAddressBookContact; eMails: TContactEmails; Photo: TBitmapSurface; begin Contact := AddressBook1.CreateContact(FDefaultSource); try try Contact.FirstName := edtFirstName.Text; Contact.LastName := edtLastName.Text; Contact.Phones.AddPhone('Home', '767867679678'); //<<<-------- if not Image1.Bitmap.Size.IsZero then begin Photo := TBitmapSurface.Create; try Photo.Assign(Image1.Bitmap); Contact.Photo := Photo; Image1.Bitmap.SetSize(0, 0); finally Photo.Free; end; end; // Add the work mail eMails := TContactEmails.Create; try eMails.AddEmail(TContactEmail.TLabelKind.Work, edtWorkMail.Text); Contact.eMails := eMails; finally eMails.Free; end; // Save a newly created contact to Address Book AddressBook1.SaveContact(Contact); except on E: EAddressBookException do ShowMessage('Cannot create the contact.' + E.Message); end; // Add the contact to the selected group, if any try if InRange(ComboBox1.ItemIndex, 0, FGroups.Count - 1) then AddressBook1.AddContactIntoGroup (FGroups.Items[ComboBox1.ItemIndex], Contact); except on E: EAddressBookException do ShowMessage('Cannot add the newly created contact to group.' + E.Message); end; ListViewContacts.BeginUpdate; try AddListViewItem(Contact); finally ListViewContacts.EndUpdate; end; TabControl1.ActiveTab := TabItemContacts; finally Contact.Free; end; // Clear the Add Contact Form ClearAddContactForm; end;
-
This indeed solved the problem in very easy way thanks alot 😍 💐
- 2
-
11 hours ago, vfbb said:FMX does not natively support RTL. However, it is possible to use third-party libraries that enable RTL in FMX. Skia4Delphi is one of them: https://github.com/skia4delphi/skia4delphi#right-to-left
This mean I have to draw at canvas level inside each row in TListView ?
ACanvas.DrawSimpleText('"Each dream that you', 2, 25, LFont, LPaint);
-
Hi
Currently in the AddressBook sample app it display Arabic letters scrambled like
ي ا ش ق
So no possible way to display it correctly ?
- 1
-
Thanks @programmerdelphi2k copy from forum and paste into Delphi also copy hidden characters but after removing them the code work
-
interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, System.Permissions, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, Vcl.ComCtrls, Commctrl, FMX.AddressBook.Types, FMX.AddressBook, FMX.StdCtrls, FMX.SearchBox, FMX.Layouts, FMX.ListBox, FMX.Controls.Presentation, FMX.Edit, FMX.TabControl, FMX.Platform, System.Actions, FMX.ActnList, FMX.ListView.Types, FMX.ListView.Appearances, FMX.ListView.Adapters.Base, FMX.ListView, FMX.StdActns, FMX.MediaLibrary.Actions, FMX.Objects, FMX.Surfaces; .... procedure TForm1.FormShow(Sender: TObject); var LItem: TListItem; begin LItem := TListItem.Create(ListViewContacts.Items); LItem.Text := 'new item';
@programmerdelphi2k thanks but still same error.
-
23 minutes ago, programmerdelphi2k said:in "FMX", all "caption" stay to "Text" -> Text = Caption!
Undeclared identifier: 'Text'
-
Hi
It is FMX app but I just want to test adding items from code in Windows so I used that code from here
var LItem: TListItem; begin LItem := TListItem.Create(ListViewContacts.Items); LItem.Caption := 'new item';
I added "
Commctrl" to uses clause but "Caption" is not defined, why ?
-
10 hours ago, Dave Nottage said:This demo starts/works OK on my Pixel 6 Pro, which has Android 13. I'm using Delphi 11.2 with Patch 1 installed.
the sample work fine from this link !! ...thanks as usual
- 1
-
22 minutes ago, programmerdelphi2k said:always test with an "Empty project"! Else, your doubts will be for eternity.
ps: nobody will install your or any other APK in smartphone!
empty application work. I provided original link on embarcadero or it can be found in samples folder
-
10 minutes ago, Dave Nottage said:Which version of Delphi are you using? Which version of Android is on the device? Have you tried running the app via the debugger to check whether there's any errors?
Delphi 11.2 with October patch. Android 10. Tried the debugger only the splash screen appear and stop at it
this is all I see:
-
The contact sample app is here but I dont know why it does not want to work on my device
https://docwiki.embarcadero.com/CodeExamples/Sydney/en/FMX.Address_Book_Sample
-
How I execute shell adb commands on my android device ?
-
When I try to open the sample app contacts I only see FMX splash screen then nothing. I attached the apk here:
https://mega.nz/file/OLoDFZRB#GlHVnZv4t9KX4_hmVe91mK9-M1whPoD_SNIWyd2IBv4
any advise ?
-
57 minutes ago, Dave Nottage said:your solution solved the problem many thanks
-
Just now, Dave Nottage said:There's no instruction there to reinstall Delphi.
I know I am just trying this
-
22 minutes ago, Dave Nottage said:Thanks I am reinstalling Delphi again now and will try
-
-
found the problem it was the firewall !!
-
I select USB as transfer files from the phone is that right ?
-
I already did all that still device not appear as target platform
-
Hi
I use Delphi 11.2 and I am trying to conenct it to my android device honor 8x . I followed all the steps
but I got dizzy and I am unable to find device usb driver I tried google usb driver did not work
http://developer.android.com/sdk/win-usb.html
OEM driver also I dont know where to find
https://developer.android.com/studio/run/oem-usb
https://consumer.huawei.com/en/support/
the phone is visible in device manager
\extras folder in your installed <SDK> directory, only contain folder called intel.
What I am missing ?
-
-
1 minute ago, pyscripter said:I dont't think python 11 is supported yet.
Oh really ? I will uninstall 11 and install 10 then...thanks
Adding phone numbers in addressbook
in FMX
Posted
@programmerdelphi2k
I tried like you said but still number was not added. Also sometimes I get stackoverflow erro and external exception 78 error