If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Arc Menu in blackberry

Possible to do. May not actually be that tricky either.  The Button press would cause a Popup screens o be displayed, positioning it would be tricky.  The popup screen would have a transparent background, I am pretty sure this can be done, just never done it.  The Popup screen would have its own Manager that laid out the buttons as you require.

 

So the tricks are:

 

a) Positioning the popup screen

b) making a transparent popup screen

c) Creating your layout Manager to arrange buttons in an arc. 

d) Creating a icon button field

 

Tackle these separately, there are various KB articles and forum entries that will help with each.  Put them together at the end.

 

Sounds like fun.  Also sounds like hard work, as Simon suggests.  Good luck. 

Please use plain text.
Developer
developer_aman_arora
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Re: Arc Menu in blackberry

I think that will be possible but not through popup screen, because by using Popup red button not be clicked again untill that pop up will be removed.
Please use plain text.
Forums Advisor I
vaishali28
Posts: 501
Registered: ‎03-01-2013
My Device: BlackBerry Z10

Re: Arc Menu in blackberry

Aman then how to do this?

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Arc Menu in blackberry

"using Popup red button not be clicked again until that pop up will be removed"

 

That is exactly the processing that t would want to happen.  The Popup screen will display the button choices - nothing else can be used on the screen until one of the choices has been used (or the popup screen is closed).  The buttons will overlay the current screen, in the same way as the standard BlackBerry menu popup screen does.

 

Is this what you want?

Please use plain text.
Forums Advisor I
vaishali28
Posts: 501
Registered: ‎03-01-2013
My Device: BlackBerry Z10

Re: Arc Menu in blackberry

The red icon when clicked showed all the options and they all are clickable i.e when we click on any option the new screen will open and again if we click the red button all the options will be hidden. This is my requirement

Please use plain text.
Developer
developer_aman_arora
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Re: Arc Menu in blackberry

1) take a button on a screen and blank HorizontalField manager in starting
2) on that button clicked add multiple buttons to horizontal manager.
3) if that horizontal manager is not empty, then again click on that upper button remove all buttons from horizontal manager

u will get something like u want, try once hope it will help you
Please use plain text.
Forums Advisor I
vaishali28
Posts: 501
Registered: ‎03-01-2013
My Device: BlackBerry Z10

Re: Arc Menu in blackberry

Hi i have tried this. But nothing happening..

public UiAppScreen()
    {
        horizontal= new HorizontalFieldManager()
        {
            
        };
        add(horizontal);
        
        b1= new ButtonField("Click..");
        b1.setChangeListener(this);
        add(b1);
    }
    public void fieldChanged(Field field, int context)
    {
        if(field==b1)
        {
            b2= new ButtonField("Button1");
            b3=new ButtonField("Button2");
            b4= new ButtonField("Button3");
            horizontal.add(b2);
            horizontal.add(b3);
            horizontal.add(b4);
        }
        
    }

Please use plain text.
Developer
developer_aman_arora
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Re: Arc Menu in blackberry

[ Edited ]
public TestMainScreen() 
	{
		 b1= new ButtonField("Click..");
		 b1.setChangeListener(this);
		 add(b1);    
		 horizontal= new HorizontalFieldManager();
		 add(horizontal);
	        
	       
	   
	}
	public void fieldChanged(Field field, int context)
	{
		if(field==b1)
		{
if(horizontal.getFieldCount() == 0)
            { b2= new ButtonField("Button1"); b3=new ButtonField("Button2"); b4= new ButtonField("Button3"); horizontal.add(b2); horizontal.add(b3); horizontal.add(b4);
}
else
{
horizontal.deleteAll();
}
} }

 u have to add button above and then add blank horizontal field manager, try above code

 

Please use plain text.
Forums Advisor I
vaishali28
Posts: 501
Registered: ‎03-01-2013
My Device: BlackBerry Z10

Re: Arc Menu in blackberry

Hey Thanks buddy its working..

But i have to set the position of the options in the arc. How to achieve this?

Please use plain text.
Developer
developer_aman_arora
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Re: Arc Menu in blackberry

Either use ARC type images or set images Height using:

 

hfm = new HorizontalFieldManager(USE_ALL_WIDTH)
        {
             protected void sublayout(int maxWidth,int maxHeight)
             {
                 super.sublayout(maxWidth, maxHeight);
                 setPositionChild(this.getField(0), (give static width here), (give static height there )); // for first button
                 setPositionChild(this.getField(1), (give static width here), (give static height there )); // for Second button

                    ////////////////// Add more

                    ////////////////// Add more
             }
        };

Please use plain text.