When I run the QuickActionExample I get the error
javac: file not found: src\de\amberhome\quickactionexample\designerscripts\*.java
What could I be doing wrong?
Ramesh Raj
When I run the QuickActionExample I get the error
javac: file not found: src\de\amberhome\quickactionexample\designerscripts\*.java
What could I be doing wrong?
Ramesh Raj
I can't find how to set background color for AHPopupMenu or single AHActionItem. Is this possible?
Now I get by default black background and white font (and grey like 3D lines between items). Can I change background to white, font to black (android holo theme)?
Also, is it possible to change font?
I think this library is a good stuff, but without the capacity to change the menu item title at Runtime without the need to re-create it (for example clicking on it and change the item title/text), is very very limited and partial.
I tried to use this lib with OpenStreetMap lib, that uses the overlay objects that are not views when tap over it.
I added a transparent Panel1 and used it as the view for PopUpMenu.Show(Panel1) - i mean - i change Panel's coords just before PopUpMenu.Show(Panel1).
But strange - menu is shown always under the previous tapped point, but not under the just tapped one...
I tried to use this lib with OpenStreetMap lib, that uses the overlay objects that are not views when tap over it.
I added a transparent Panel1 and used it as the view for PopUpMenu.Show(Panel1) - i mean - i change Panel's coords just before PopUpMenu.Show(Panel1).
But strange - menu is shown always under the previous tapped point, but not under the just tapped one...
This is a very nice library but I have the same problem as peacemaker. I create a small invisible panel and use that as the menu's anchor point. The menu popup only shows up at the initial point where it is created even when I change the panel's location. I am using this menu in other parts of my software (listviews) without a problem but I would like to be consistent. Could someone look at this library and please fix this bug?
Hmm. One of the first things done in the Show() method is AnchorView.getLocationOnScreen(); which should give the position of the anchor view on screen. Maybe if the AnchorView is moved and then Show() is called this method still returns the old position. Please try a DoEvents call just before showing the QuickAction popup.
Hmm. One of the first things done in the Show() method is AnchorView.getLocationOnScreen(); which should give the position of the anchor view on screen. Maybe if the AnchorView is moved and then Show() is called this method still returns the old position. Please try a DoEvents call just before showing the QuickAction popup.
Thanks for the tip. I'll give that a try when I get home this afternoon and will post the results. Thanks again.
UPDATE: Calling DoEvents after setting the view (panel) position and before the QuickAction Show() solves the problem that I was having. Thanks Corwin42
I had a strange error on below. My program work fined earlier and out of sudden when I recompile and run the program. Then I hit into this below error in ac1.Initialize("AC"). The variable is declared in Sub_Globals (Dim ac1 As AHQuickAction). I did download the sample program and test. But It's work. Any idea what is the cause?
B4X:
android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.Resources.getValue(Resources.java:1339)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2445)
at android.content.res.Resources.getAnimation(Resources.java:1202)
at android.view.animation.AnimationUtils.loadAnimation(AnimationUtils.java:71)
at de.amberhome.quickaction.QuickAction.Initialize(QuickAction.java:120)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:680)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:308)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
at b4a.xxx.pd.pd.afterFirstLayout(pd.java:98)
at b4a.xxx.pd.pd.access$100(pd.java:16)
at b4a.xxx.pd.pd$WaitForLayout.run(pd.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4935)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
Thanks. corwin, you are right. it's working after i copy the missing folders back and set them to readonly.
I notice after I upgraded the B4A to v3.5, this problem happened very often. The folders inside Object/res will be deleted off (except drawable, layout and xml folders). Especially when we edit the programs created in older version. And we need to manually add the folders and set it to readonly then it will not deleted.