how can two sidemenus be used in codenameone? - codenameone

I want to add sidemenus at both left and right side.How can it be done in codenameone ?
getToolbar().addCommandToSideMenu(new Command(" Menu 1 "));
I can left sidemenu by using above code and i want to add that on right also.

The Toolbar class no longer supports the right side menu. This functionality has always been problematic and was deprecated a while back. We might re-introduce it with the new "on top" side menu rewrite but right now that functionality is too new.

Related

How to make the side drawer not shrink the main body, but come as an overlay on top of it

So, I am using a similar code snippet as provided here(Material UI) :
Code sandbox
When we click on the top left menu icon, it opens the side drawer which shrinks the main body, I wanted it to be able to come on top of the main body, sort of like overlay you can say. I tried changing the z-index but that didn't seem to work. Will really appreciate some help
The official way to do this is use default value of variant (temporary) of Drawer component. In your example, variant you use is permanent.
Of course you need to change CSS a bit to adapt yourself.
API document here: https://material-ui.com/api/drawer/
Offical demo here also: https://material-ui.com/components/drawers/#temporary-drawer

Sidemenu and tab issue in iOS - cn1

I have 4 tab in a tabs component and a side menu. If I scroll horizontal the 1st tab from the left side, the side menu tends to appear but it doesn't. However the 1st tab moves horizontally from left to right and white blank screen is seen.
Have a look at the video here.
Using tabs with a side menu is not a good idea. You could try adding a fifth tab and placing commands there instead of a side menu.
It will look the same and it should work better than a side menu.
hope this helps and good luck with your development :)

How to show left right icon whenever there is scroll

I am using angular-material in my project.
I have requirement in which I have to show left and right arrow automatically that will indicate there is scroll horizantally.
as you can see in the picture.
You can use for it one of the angular carousel modules. Like this.
Or one of the list

How to implement a left to right navigation menu?

"Left to right navigation menu"?
It's hard to describe what I mean. I'm new to Ionic but I need a special navigation bar below my action bar. I want to click on an item in my action bar and a navigation menu should be opened. The navigation menu should have many levels. But if I choose one item in the list, I want to see the last list and the new one. And I can slide through the menu (left & right).
Hope you know what I mean. How can I implement this? Is there any name for it?
UPDATE:
It's a bit similar to this:
http://bradfrost.com/blog/web/complex-navigation-patterns-for-responsive-design/#ol-left-to-right
With the difference that the old menu should not disappear, but stay on the left side of the menu.

How to check if element has class with AngularJS?

I have an off panel menu working perfectly on a site. The user can open and close it using both a navicon or sliding it with the finger.
Right now I have a very nice navicon icon that transitions from Menu Icon to X Icon when is clicked (and opens the menu) and the other way around when is clicked again and the menu closes. Buuut if the user slides the menu open or closed instead of using the navicon, the transition is not triggered, which might lead to confusions on the UX (i.e. the menu being closed, and the navicon showing an X instead of the regular 3 horizontal lines icon).
So, the navicon has right now the following code to trigger the transition:
ng-click="open = !open" ng-class="{'open-mob':open}">
I thought that a nice and easy way to fix this, would be to trigger this "open = !open" every time that the menu is open or closed, as the js from the off panel adds the class slidRight to the main section when the menu is open, and removes it when it is closed.
Being so, is there some straight way to check if the class is there using AngularJS?
Something like if class = slidRight -> "open = !open".
Thanks!!
for those (including me) who could not get their head around Angular's documentation, here is an example which worked for me:
angular.element(myElement).hasClass('my-class');
angular.element(myElement).addClass('new-class');
angular.element(myElement).removeClass('old-class');
hope this help someone ...
Angular uses jqLite's .hasClass() natively.
Read here on the angular docs for more info.
http://docs.angularjs.org/api/angular.element
https://docs.angularjs.org/api/ng/function/angular.element

Resources