B4A Library Spotlight PopUp Menu

hi b4x.com

this is a simple lib i wrote (no wrapper).
Its a Popup Menu in Spotlight look.

this is NOT the feature Spotlight that is available on Android 7, it is a just a PopUp Menu in Spotlight look.

if you like it i would really appreciate a small donation :)

Please tell me if you find any issues or bugs.
I am including the lib files + an example. take a look at it, it should be very simple to understand.
if you have any question don't hesitate to ask me ;)

EDIT: v1.01 support for Fontawesome/Materialdesign Icons (see post #4)

EDIT: v1.02 bug fixed + Example updated

EDIT: v1.03 bug fixed+ Example updated + option to change background color for each item


EDIT: v1.04 bug fixed

EDIT: Source file available!


ezgif.com-77f8f62e38.gif
 

Attachments

  • IL_SpotLightMenuv1.01.zip
    7.6 KB · Views: 679
  • IL_SpotLightMenuv1.02.zip
    7.8 KB · Views: 664
  • IL_SpotLightMenuv1.03.zip
    8.1 KB · Views: 683
  • Example.zip
    37 KB · Views: 1,072
  • IL_SpotLightMenuv1.04.zip
    8.1 KB · Views: 1,058
  • Source.zip
    39.9 KB · Views: 870
Last edited:

metrick

Active Member
Licensed User
Longtime User
Popup menu still block the button with version 1.03. Another option would be to set popup position when initialize? Thanks.
 

DonManfred

Expert
Licensed User
Longtime User
Another option would be to set popup position when initialize?
Based on the answer earlier in the thread i dont think it will help.

The spotlight is on a panel. i create a panel that covers the whole screen and all menuitems are added to it.
So,even if the popup raises on top of the activity the hole activity is still blocked by the fullscreenpanel.
 

ilan

Expert
Licensed User
Longtime User
Popup menu still block the button with version 1.03. Another option would be to set popup position when initialize? Thanks.

Sorry but i am not sure that i understand the problem.
When you show the popupmenu then you have 2 options or click on one of the menu items or click where ever u want on the screen and hide the menu. You can also click on the back button to hide the menu.

So it is the normal behavior that when the menu is shown you cannot click on anything else.

Every popup menu behave like this.
There was a problem that other views where on front when the popup menu was shown. That happened when you used a material theme but that should be fixed now.
 

metrick

Active Member
Licensed User
Longtime User
The popup menu is blocking the button where it should be above it. Like shown on #1 post.
 

ilan

Expert
Licensed User
Longtime User
The popup menu is blocking the button where it should be above it. Like shown on #1 post.

i have uploaded v1.04. i think it should be ok now.
dont forget to click on right mouse button and "Refresh" on the lib tab in your project.
 

ilan

Expert
Licensed User
Longtime User
Runs fine on device with API 25 (7.1.2) with targetSDK=22

Is it possible to remove the "=" on the right?


View attachment 55729

Thanks for your contribution. I've sent you a beer....

Thanx a lot for your donation.

Yes it should be possible but i am now at work so i will post later how you can do it.

Thank you, ilan :)
 

ilan

Expert
Licensed User
Longtime User
Is it possible to remove the "=" on the right?

sorry for the late response, i was yesterday almost the whole day in hospital with my wife.
She gave birth to our fourth child :)

ok so if you want to remove the "=" character its very simple

every menuitem is build of 4 views.:

1 panel that holds 2 lables and 1 button

the "=" is a separate label so we can just say something like this:

B4X:
        Dim p As Panel = Spotlightmenu.ItemPanel(0)
        Dim lbl As Label = p.GetView(2)
        lbl.Text = ""

this will remove the "=" from menu item in position 0.

you can put any character you like instead of "=".

regards, ilan
 
Last edited:

ilan

Expert
Licensed User
Longtime User
Herzlichen Glückwunsch an Deine Familie!

Thanks for the extra effort to answer here when you had your heart full of so many thoughts.

Vielen Dank :)

Ps. Im Screenshot sind die Tage auf Deutsch geschrieben aber Sonntag scheint auf english zu sein. War das Absicht? ;)

(Mo, Di, Mi, Do aber Sonntag mit Sun??)
 
Top