Jump to content

Search the Community

Showing results for tags 'images from web'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Clients
    • Download Trial
    • Download Release
    • News
    • Questions of future users
    • Voitng for new features
    • FGX Native projects
    • Feedbacks
  • Private forum. For users with active subscription
    • Animations
    • Alignment (Flexbox)
    • Components
    • Assets
    • Graphics
    • Demos
    • Logging
    • Systems permissions
    • Notifications
    • Virtual keyboard
    • Themes
    • Gestures
    • Forms
    • Platform Questions
    • Localization (L11N)
    • Emulator
    • Publishing
    • IDE Designer
    • Component development
    • Additional files
    • Other questions
  • Bug Reports
    • Opened
    • Closed
  • Organization of the work of this forum
    • Rules

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me

Found 1 result

  1. 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.
  • Create New...