A simple class that manages the list of recent files.
You can set the maximum number of recent files. The default is 5.
Depends on: B4XCollections and JavaObject.
1. Call xui.SetDataFolder to set the default files folder:
RecentManager.Initialize(Me, "Recent", MenuBar1.Menus.Get(0))
The manager will add and remove the recent files menu items as needed.
3. Whenever you want to add a file to the recent files list:
4. Save the list of files when the program ends:
Sub MainForm_Closed RecentManager.SaveList End Sub
v1.01 - Files are checked for existence when the list is loaded.
Top item is the most recently used file.