ThePuiu Active Member Licensed User Longtime User Dec 28, 2020 #1 I use the following code: B4X: Dim bd As BitmapDrawable bd.Initialize(LoadBitmap(File.DirAssets, "stop.png")) bar.NavigationIconDrawable = bd ToolbarHelper.Initialize ToolbarHelper.ShowUpIndicator = True bar.InitMenuListener and I don't know how I can capture the Click on the back icon event. Thank you! Attachments Screenshot_20201228-214618.jpg 10.4 KB · Views: 203
I use the following code: B4X: Dim bd As BitmapDrawable bd.Initialize(LoadBitmap(File.DirAssets, "stop.png")) bar.NavigationIconDrawable = bd ToolbarHelper.Initialize ToolbarHelper.ShowUpIndicator = True bar.InitMenuListener and I don't know how I can capture the Click on the back icon event. Thank you!
roumei Active Member Licensed User Dec 29, 2020 #2 I assume that you're using the AppCompat example from here, right? AppCompat with ToolBar - minimal example | B4X Programming Forum You can find the event in the example code: B4X: Sub ACToolBarLight1_NavigationItemClick Log("click1") End Sub Please note that there's no need to load a bitmap for the icon when you're using the ShowUpIndicator. Upvote 0
I assume that you're using the AppCompat example from here, right? AppCompat with ToolBar - minimal example | B4X Programming Forum You can find the event in the example code: B4X: Sub ACToolBarLight1_NavigationItemClick Log("click1") End Sub Please note that there's no need to load a bitmap for the icon when you're using the ShowUpIndicator.
Erel B4X founder Staff member Licensed User Longtime User Dec 29, 2020 #3 B4XPages example: https://www.b4x.com/android/forum/threads/b4x-b4xpages-b4xdrawer.120246/#content Upvote 0