Android Question Changing StdActionBar at runtime

mfstuart

Active Member
Licensed User
Longtime User
I would like to change out the StdActionbar buttons when the user does a long click on a CustomListView - hide 2 existing buttons and show a different button.

Currently, I have 2 buttons on the StdActionbar, Refresh and an Add button.
In the CustomListView_LongClick event I would want to hide these 2 buttons and add/show a Delete button. This would signal/notify the user that they can now delete the selected record.
The user options would be to then touch on the Delete button to delete the record, or to touch on the back arrow (UpIndicator) to cancel the delete. This would hide the Delete button and show the original 2 buttons.

Is this possible with the StdActionbar? If not, what options do I have to do this?

If you've used the Outlook app on Android, you'd be familiar on how this works.

Thanx,
Mark Stuart
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Best solution is to remove StdActionBar and switch to B4XPages.

 
Upvote 0
Top