Jump to content

All Activity

This stream auto-updates     

  1. Yesterday
  2. When you query a picture for the first time, it uploads it and save to Assets, the next time it will no longer upload a picture. And your fgimage always geting pic from Assets.
  3. Hi All, now my demo works better, thanks Knsg12. However i've seen that TfgAssetsManager.Current.AddBitmapFromUrlAsync take a lot of time ( 20 - 30 seconds ) to download the thumbnail from 'https://via.placeholder.com/150/92c952'. I've tried also to update your demo AsyncBitmapAssetDemo and i've replaced your sample url with mine. The first execution take 20 second, the nexts less than 1 second. How could be possibile ? Many thanks guys for your support.
  4. Hi Knsg12, you are right... AlbumId is not unique... excuse me. I check better if now it is solved. Thanks a lot, Luke.
  5. if not TfgAssetsManager.Current.Contains(Item.FalbumId) then TfgAssetsManager.Current.AddBitmapFromUrlAsync(Item.FalbumId, Item.FthumbnailUrl); AItem.GetControlByLookupName<TfgImage>('ImgAlbum').ImageName := Item.FalbumId; Try it! I think Item.FalbumId not uniq field for records, it needs to be replaced by Item.Id.
  6. Hi All, i'm testing tfgCollectionView with this rest resource : http://jsonplaceholder.typicode.com/photos In this test my CollectionView Style has 1 fgImage and 1 fgLabel. I get the RestResouce with a TRESTRequest.ExecuteAsync and it works perfectly. When i've the ExecuteAsync CallBack i parse the JSON output string and i fill my Photos collection (TList). I do this step with a separate Task because i've 5000 items ( more or less). When i link data to the CollectionView i call fgCollectionViewGetItemCount and fgCollectionView1BindItem. If i bind only the fgLabel all works perfectly. My problem is link the tfgImage to the thumbnail. I post my code: procedure TFramePhoto.fgCollectionView1BindItem(Sender: TObject;const AIndex: Integer; const AStyle: string; const AItem: TfgItemWrapper); VAR Item:TPhotoData; begin TRY Item:=RestPhotos.Items[AIndex]; AItem.GetControlByLookupName<TfgLabel>('LblTitle').Text := Item.Ftitle; TfgAssetsManager.Current.AddBitmapFromUrlAsync(Item.FalbumId, Item.FthumbnailUrl, procedure (const AResultCode: Integer; const AResultMessage: string) begin AItem.GetControlByLookupName<TfgImage>('ImgAlbum').ImageName := Item.FalbumId; end); EXCEPT ON E:EXCEPTION DO FGX.Log.TfgLog.Log(TfgLogLevel.Debug,'fgCollectionView1BindItem ' + e.Message); END; end; Actually i'm saving the images in assets but i think it is a bad idea... Can you suggest a best practice for this scenario ? Thanks a lot guys, Best Regards.
  7. Last week
  8. Ярослав, пожалуйста добавьте в исходники Assets, раньше они были, потом исчезли, для справочной информации нужны, правда правда. Спасибо
  9. procedure TFormMain.imgQRCodePaint(Sender: TObject; const ACanvas: TfgCanvas); begin ACanvas.FillColor(TAlphaColorRec.White); TfgAssert.IsNotNil(QRCodeBitmap, 'QRCodeBitmap is nil imgQRCodePaint'); ACanvas.DrawBitmap(QRCodeBitmap, TRect.Create(0, 0, QRCodeBitmap.Width, QRCodeBitmap.Height), TRectF.Create(0, 0, ACanvas.Width * TfgAndroidHelper.ScreenScale, ACanvas.Height * TfgAndroidHelper.ScreenScale)); end;
  10. this imgQRCode component fgimage? and when QRCode showing?
  11. QRCodeBitmap: TfgBitmap; procedure TFormMain.UpdateQR; var QRCode: TDelphiZXingQRCode; pixelColor: TAlphaColor; Row, Column: integer; y, x: integer; columnPixel, rowPixel, pixelCount: single; function GetPixelCount(AWidth, AHeight: single): single; begin if QRCode.Rows > 0 then Result := (Trunc(Min(AWidth, AHeight)) div QRCode.Rows) * TfgAndroidHelper.ScreenScale else Result := 0; end; begin TfgAssert.IsNotNil(QRCodeBitmap, 'QRCodeBitmap is nil UpdateQR'); QRCode := TDelphiZXingQRCode.Create; try QRCode.Data := ' ' + QRCodeText; QRCode.Encoding := qrAuto; QRCode.QuietZone := 1; pixelCount := GetPixelCount(imgQRCode.Width, imgQRCode.Height); QRCodeBitmap.Size := TSizeF.Create(QRCode.Rows * pixelCount, QRCode.Columns * pixelCount).Round; QRCodeBitmap.Canvas.Stroke.Kind := TfgBrushKind.Solid; QRCodeBitmap.Canvas.Fill.Kind := TfgBrushKind.Solid; for Row := 0 to QRCode.Rows - 1 do begin for Column := 0 to QRCode.Columns - 1 do begin if (QRCode.IsBlack[Row, Column]) then pixelColor := TAlphaColorRec.Black else pixelColor := TAlphaColorRec.White; columnPixel := Column * pixelCount; rowPixel := Row * pixelCount; QRCodeBitmap.Canvas.Fill.Color := pixelColor; QRCodeBitmap.Canvas.Stroke.Color := pixelColor; QRCodeBitmap.Canvas.FillRect(columnPixel, rowPixel, columnPixel + pixelCount, rowPixel + pixelCount); end; end; finally QRCode.Free; end; end;
  12. Hello, I have tried this source code before, but failed to apply it to FGX. in this section I have not found the code on FGX. QRCodeBitmap.Canvas.Pixels[Column, Row] := clBlack; and how to repaint tfgpaintbox. Thanks you
  13. Hello Luke, TfgSearchEdit doesn't depend on other controls. It just provide text input field with autocomplete functionality. And it supports 2 ways for getting autocomplete values: Static. Manual setting of values via Suggestions property. For small values list. Dynamic. You fill suggestions list in OnChanging event. The CollectionView filtering method is fully provided to you. For example: You can filter your collection view model data (related TList, model, DAO and etc) and invoke ReloadItems. Also if you provide unique item's id via OnGetItemID, collection view will animate refreshing items. So user will see which items are disappeared. Thank you
  14. Всем хорошей пятницы, Немного новостей с полей разработки iOS 🔨. Мы продолжаем активно работать над реализацией iOS части библиотеки FGX Native и хотим поделиться с вами текущим статусом 🔥. 1. Полностью реализованы новые компоненты TfgScrollBox, TfgVerticalScrollBox, TfgHorizontalScrollBox, TfgCardPanel, TfgSwitch, TfgTimer CardPanel-Demo.mp4 2. Частично реализована поддержка TfgBitmap Реализованы базовые операции с TfgBitmap: Создание. Работа со скейлом Чтение из разных источников. Сохранение. 3. Добавлена поддержка ресурсов Научили iOS приложение работать с нашими ресурсами. Теперь app пакет содержит ресурсы FGX Native приложения. 4. Реализованы вспомогательные сервисы Реализована часть служебных сервисов (IFGXLocaleService, IFGXApplicationInfoService, IFGXScreenService) используемых, в том или ином виде в существующих компонентах и вспомогательных классах. 5. Частично реализован TfgCollectionView Реализована базовая функциональность списка. Создание элементов. Поддержка стилей. Связывание данных. CollectionView.mp4 collectionView-3.mp4 6. Частичная реализация TfgImage Реализованы все методы отображения изображений, кроме маски. 7. Реализация диалогов Реализованы диалоговые окна TfgDialogs для отображения сообщений и диалогов с кнопками. 8. Добавлены новые хедеры для iOS 13. Транслированы и добавлены свои собственные хедеры для iOS API.
  15. Hi All, I'm trying to use a tfgSearchEdit with a tfgCollectionView. I'm searching the better way to set the focus to the CollectionViewitem that match my search value. There is a demo that explain this management ? I've seen that i can fill the SearchEdit.Suggestions with the CollectionViewItems field otherwise i can do a binarysearch in the Tlist<> that is linked to the CollectionView but i've to sort the list. Can you suggest a best practise for that ? Thanks a lot, Luca.
  16. http://zarko-gajic.iz.hr/firemonkey-mobile-android-ios-qr-code-generation-using-delphi-xe-5-delphizxingqrcode/
  17. Hello, Try this component. Debenu-DelphiZXingQRCode.zip
  18. fglistMenu component has an event OnTapItem. procedure TFormMain.fgListMenu1TapItem(Sender: TObject; const AItem: TfgListMenuItem); AItem is what you need.
  19. Hi All, i've tryied to manage the event fgListMenuItemOnTap as written below and i've seen that the Sender is not a fgListMenuItem object but fgListMenu. procedure TFormMain.fgListMenu1Items0Tap(Sender: TObject); begin fgLabel3.Text := Sender.ToString(); end; In this way i'm not able to understand witch item i've pressed so i've to manage each onItemTap with a specific event. Is it normal or i'm doing a mistake ? Thanks a lot, Luca.
  20. О, Боже, и тут Малышева вездесущая... с "чудом чудесным" ))))
  21. Hello, I need a component that can generate QRCode. logically it can be generated on the server, then the application downloads as an asset. but it will be easier if FGX can generate it. thanks you
  22. Earlier
  23. Download : setup_1.4.1.1_release.eng.zip Release d ate: 7 July 2020 Changelog: * Android-64 bit libraries paths were fixed for 10.4. * TfgTimer: - When timer is stopped, application raises "Invalid Pointer" exception. Fixed. https://forum.fgx-native.com/topic/386-tfgtimer-timer-demo-error-error/ * Java-Delphi bridge: - TJavaLocal had additional overloaded constructor for possibility disable interface reference counting for listener. * Designer: - Project wizard creator appearance were fixed for RAD Studio 10.4.
  24. Скачать: setup_1.4.1.1_release.rus.zip Дата релиза: 07 июля 2020 Список изменений: * Поправлены пути к статическим библиотекам Android-64 bit для 10.4. * TfgTimer: - При остановке таймера, возникала ошибка "Invalid Pointer". Исправлено. https://forum.fgx-native.com/topic/386-tfgtimer-timer-demo-error-error/ * Java-Delphi мост: - Для TJavaLocal добавлен перегруженный конструктор с возможностью отключить автоматический подсчет ссылок для реализуемого листенера. * Дизайнер: - Поправлено отображение мастера создания проекта для RAD Studio 10.4.
  25. Hi all, just for sample i'm trying to put a square in the form center, and a circle in the square center. I've placed a layout with FlexGrow=1 so it will take all the form space and AlignmentChildren.JustifyContent=Center. Into the layout i've placed the square with PositionMode=relative. Now if i try to put the circle i can't use relative position but only absolute and i've to place the circle in the center without any support. How i can solve ? Thanks a lot, Best Regards.
  1. Load more activity
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...