When i choose Tools/Clean Project and then copy the 'res' folder into my object folder, it still gives an error that I need to declare the resources.You should press on Tools - Clean project. This deletes an automatically generated file and forces the compiler to recreate it.
When i choose Tools/Clean Project and then copy the 'res' folder into my object folder, it still gives an error that I need to declare the resources.
So this lovely library is not usable for me.
Copy the whole "res" directory structure to the "Objects" directory of your B4A project and VERY IMPORTANT: make them READ ONLY! Otherwise B4A will delete them when compiling.
Do you know how to solve this?
http://www.b4x.com/forum/additional...ary-nice-looking-popup-menus-5.html#post87419
Centered would be better or even better width filled. See the gap on the screenshot for a Galaxy nexus.
Yes, thanks...Read the instructions carefully: You have to make the files read only.
Sub Button_changealbum_Click
Dim jj As Int
Dim album1 As AHActionItem
Dim bd As BitmapDrawable
dirlist.Initialize
alllist.Initialize
' alllist.Clear
' dirlist.Clear
alllist=File.ListFiles(File.DirRootExternal & "/CameraGPX/")
For jfile=0 To alllist.Size-1
If File.IsDirectory(File.DirRootExternal & "/CameraGPX/",alllist.Get(jfile)) Then
dirlist.Add(alllist.get(jfile))
End If
Next
dirlist.Sort(True)
'menu_listalbums
menu_listalbums.Initialize("menu_listalbums",menu_listalbums.VERTICAL)
For jj= 0 To dirlist.Size-1
bd.Initialize(LoadBitmap(File.DirAssets, "bullet.png"))
album1.Initialize(jj, dirlist.Get(jj), bd)
album1.selected = True
album1.Sticky = False
menu_listalbums.addActionItem(album1)
Next
menu_listalbums.show(button_changealbum)
End Sub
You should press on Tools - Clean project. Otherwise the IDE doesn't rebuild the resources mapping file (R.java).
A better solution using Reflection library:
B4X:Sub ListView1_ItemClick (Position As Int, Value As Object) ac1.Show(GetViewAtPos(Sender, Position)) End Sub Sub GetViewAtPos(LV As ListView, Position As Int) As View Dim r As Reflector Dim v As View r.Target = LV Dim first As Int first = r.RunMethod("getFirstVisiblePosition") v = r.RunMethod2("getChildAt", Position - first, "java.lang.int") Return v End Sub
Sub AC_Click (Position As Int, ActionItemID As Int)
Dim action As AHActionItem
action = ac1.getActionItem(Position)
ToastMessageShow(action.Title & " pressed" & ActionItemID, False)
End Sub
'Event Sub when popup window is just dismissed
Sub AC_Dismiss
ToastMessageShow("Dismissed", False)
End Sub
Sub View_Click
Dim Send As View
Dim row, Obj As Int
Send=Sender
row=Floor(Send.Tag/10)
Obj=Send.Tag-row*10
Select Obj
Case 0
Activity.Title="Row = "&row&" Panel"
Case 1,2,3,4,5
Activity.Title="Row = "&row&" Label = "&Obj
Case 6
Activity.Title="Row = "&row&" Image"
ac1.show(Send)
End Select
End Sub
Do you know how to solve this?
http://www.b4x.com/forum/additional...ary-nice-looking-popup-menus-5.html#post87419
Centered would be better or even better width filled. See the gap on the screenshot for a Galaxy nexus.
Cheers,
I'm able to show ac1 on correct position, but i'm not able to show row into AC_Click event or into View_Click event.
@Markus/bluedude
Were you able to fix the gap, perhaps by centering it?
Hey moster67, I think that's the way it is, I've seen some other apps with the same "problem", and I mean non-B4A apps.
Sub btnConfig_Click
ActionMenu.show(btnConfig)
End Sub
OK, here is a little teaser on a possible fix. This is the same tablet as above. A little more tweaking and testing and it should be there.
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?