RAD Studio 10.4.1 is now available! Learn more. Looking for discounts? Visit our Special Offers page!
CodeDatabaseDelphiRAD Studio

Learn How To Create A Custom List View Adapter With A Python Server In This Sample For Delphi

Location

You can find the CustomAdapter sample project at:

  • Start | Programs | Embarcadero RAD Studio Sydney | Samples and navigate to:
    • Object Pascal\Multi-Device Samples\User Interface\ListView\CustomAdapter
  • Subversion Repository:
    • You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.

Description

The CustomAdapter sample shows how to create a custom list view adapter. This specific implementation of a custom adapter obtains image files from a remote server.

How to Run the Sample

  1. Run the server:
    1. Install Python 2 to run the server script.
    2. On the project folder, open server.py using a text editor, and update the values of the HOST and PORT variables. Notes:
      • The default values should let you test this sample application on your development PC.
      • To run this sample application on a mobile device, you must update HOST so that it contains the IP address where your mobile devices can reach your development PC.
      • If the default post is busy in your development PC, you must change the value of PORT.
    3. Run server.py.
  2. Run the sample application:
    1. Open the sample application project file.
    2. Open the main form of the sample application in the Code Editor and update the value of the Host constant, so that the host and port match those that you configured on the server script.
    3. Run the sample application.

How It Works

After you start this sample application, it displays the following form:

600px-listviewcustomadapterfirstexecution-5435155

Click the Load Pictured button to load 30 list view items from the custom list view adapter.

Please follow the link below for more information to the original post:

http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FMX.ListViewCustomAdapter


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Learn More About Upgrading

Related posts
DelphiShowcase

Powerful Petroleum And Mining Software For Surface And Subsurface Data Visualization Is Built In Delphi

C++CodeDelphiIDE

Quickly Log Python Script Output To The Delphi Debug Log In Your Windows Apps

CodeDelphiRAD Studio

Learn How To Use Connection Pooling With A Multi-threaded Environment In Delphi

CodeDelphi

Learn How To Build A REST API App For iOS In 45 Minutes With Delphi

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES