Setting height to slider on the Swich - codenameone

On te Codename Designer I saw the Swith with a fine slider line, but when I use on a form, the circle and the slider are same Height.
¿how I must do to set the slider Height?
Switch on Designer
Switch on my Form

This is the difference between the styling of the Switch component in iOS and Android. They look different to match the platform native look. The designer lets you toggle iOS/Android native theme to see the difference.
You can explicitly override design styles in the Switch class to force a specific look. See: https://www.codenameone.com/javadoc/com/codename1/components/Switch.html

Related

Remove Tailwind className from component in Storybook

I have a mobile sidebar component that should be hidden on desktop. Since it's for mobile only mobile it has the className md:hidden.
I'm adding all my components to React Storybook to make a library of each component. But since it has that class of md:hidden it doesn't show up unless you change the viewport or the window size. Is there a way in Storybook to overwrite or take out that className?
I would like it to show up in storybook though, so I was wondering how to either remove or override that class only in storybook.
I think you got it backwards (Assuming you set the md:hidden intended for mobile). In tailwind, we use md (min-width:768) if we want the effect to apply when it exceeds 768px (not what we want if we want it to show in desktop view)
So right now, you are hiding your sidebar when it is in desktop view. Try replacing your properties with hidden md:visible. In this manner, it would default to hidden (when it's in mobile view) and once it reaches & exceeds the min-width of 768 (desktop view) it will show the sidebar. Hope this would help brother.

How would I make a Custom Switch and Toggle Like this In react Native

I am Trying to make a custom switch in react native expo but all the NPM's components don't seem to work, how would i come about creating a custom switch with animations and a custom toggle like the ones show in the image with react native expo?
What I am trying to make
To achieve your first switch example you can look at react-native-switch and tweak it slightly to take a height and width (instead of circle size). I have a working example of this here.
For your second example a simple TouchableOpacity with toggle icon should suffice. You can get a little more elborate and add a color animation if you wanted.

How to control Switch component colors?

Using MaterialUI v1.0:
How can I control a specific switch component colors (inner styling)?
How can I control every switch component colors on my app?
Have you seen the docs for the selection controls?
https://material-ui-1dab0.firebaseapp.com/demos/selection-controls/
And have you looked into Material UI's ThemeProvider? I cant find anything in V1 about changes to the theme provider so I guess it still working but I haven't tested it
http://www.material-ui.com/#/customization/themes

codenameone autocomplete text field display issue in gui

I m working on my mobile apps using codename1 and i found that after adding an autocomplete textfield to any form, every other component disapears along with tabs behind a white container.
It sounds like you are using a scrollable FlowLayout (which is the default layout manager) and some nesting behavior goes bad.
Another guess is that you add everything into the layered pane which is a HUGE MISTAKE, you should add everything to the form directly or content pane.

How to make a navigation in Expression Blend 4?

So I created a layout in Expression Blend 4 for my Silverlight application. Now I need to create a simple navigation to navigate between pages. I have a canvas control in the layout (MainPage.xaml) and I would like the navigation buttons to just change the content of the canvas.
So if a user clicks on a navigation button for Page1.xaml, the Page1's content will be loaded into the canvas.
Could anybody give me an example how to do it? I tried using the MenuItem control but I could not understand how to use it. Now I have just used buttons but I don't know how to make a navigation from them.
I would love to be wrong about this but Im pretty sure, Blend 2,3,4 (the ones I have used)are just like windows form development your controls are not active until you actually build and run the application.
Sorry
Edit
To answer your comment the menuItem is a simple control that has been predefined like a button or link. The main idea with blend is to give developers and designers the ability to customize the look and feel of control layout in a similar way html uses CSS and javascript.
Try using "Hyperlink Buttons" for your menu and display the content in a "Frame" control.

Resources