Thanks for adding this. I think there is room for improvement. Maybe we should pick up the resources directly from the android resources rather than bundling it in the res files.Added the ICS style popup menu from thedesolatesoul to this library. Thank you very much for this.
I never noticed, because I think I fixed it for the ICS Popup.Also fixed the animations of the popups. Seems that no one noticed that the entry/exit animations did not work.
I noticed a little graphical glitch: when you click on a button like Info or Delete in the QAB, it becomes transparent and you can see the list behind. That lasts the time the QAB vanishes, so it's very short, but you can see it.
This happens only when you press the entry very short so that the pressed state is not completely rendered and the window gets closed. If you press the entry longer you won't see this effect.
Sub Globals
Dim men As AHPopupMenu
End Sub
Sub Activity_Create(FirstTime As Boolean)
men.Initialize("AC")
For i = 1 To 3
Dim ai As AHActionItem
Dim bd As BitmapDrawable
Dim Filename, Text As String
Select i
Case 1
Filename = "Menu_Search.png"
Text = "MenuItem1"
Case 2
Filename = "Menu_Info.png"
Text = "MenuItem2"
Case 3
Filename = "Menu_Web.png"
Text = "MenuItem3"
End Select
'Initialize a bitmap drawable and the action item
bd.Initialize(LoadBitmap(File.DirAssets, Filename))
ai.Initialize(i, Text, bd)
ai.Selected = True
men.AddActionItem(ai)
Next
End Sub
Sub mnuSettings_Click
men.Show(Sender)
End Sub
Activity.AddMenuItem3("Settings","mnuSettings",LoadBitmap(File.DirRootExternal,"Settings.png"),True)
Sub mnuSettings_Click
men.Show(Sender)
End Sub
The popup window used by this library always needs an anchor view where the popup will be displayed. You can create an invisible dummy view (label, panel), add it to the activity and use this as the anchor for the popup. Or you can use any other view you already have on your activity.
Sub mnuSettings_Click
Dim dummy As Panel
dummy.Initialize("")
Activity.AddView(dummy, 0, 100%x, 100%x, 1)
men.Show(dummy)
dummy.RemoveView
End Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?