Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 06/27/21 in all areas

  1. corneliusdavid

    save all item from listview with DynamicAppearance

    Excellent! You're welcome.
  2. Dave Nottage

    [Android]How to make an event listener?

    By "events", if you mean things like whether the app became active, entered the background etc, you can have the app subscribe to TApplicationEventMessage: http://docwiki.embarcadero.com/Libraries/Sydney/en/FMX.Platform.TApplicationEventMessage Use TMessageManager to subscribe to the event, e.g: TMessageManager.DefaultManager.SubscribeToMessage(TApplicationEventMessage, ApplicationEventMessageHandler); ..and to unsubscribe when you no longer wish to receive the messages: TMessageManager.DefaultManager.Unsubscribe(TApplicationEventMessage, ApplicationEventMessageHandler); Example handler: procedure TMyClass.ApplicationEventMessageHandler(const Sender: TObject; const M: TMessage); var LMessage: TApplicationEventMessage; begin LMessage := TApplicationEventMessage(M); case LMessage.Value.Event of TApplicationEvent.BecameActive: DoAppBecameActive; TApplicationEvent.EnteredBackground: DoAppEnteredBackground; // etc end; end;
×