We are creating a Teams tab application and as suggested by Microsoft we are using #fluentui/react-northstar#0.49.0 for UI controls.
But there is no option for providing responsiveness in the Grid or pther layouts for making controls adjusting itslef based on the screen size (like different screen sizes, tablet and mobile).
Kindly let me know whether any option is available in that component or else we need to use any CSS framework outside for that purpose. Thanks in advance for your response.
You can use Grid https://fluentsite.z22.web.core.windows.net/layout
The reason why you don't see screen sizes is because Grid uses flexbox, which is not the same as bootstrap grid system where it does show you screen sizes.
Not familiar why fluentui northstar exists but for web I'm using the Stack component as my grid system which also uses flexbox
Related
First and most important: I am by no means a developer. We hired an agency to develop an APP for us, and i was given by a developed solution that i am not convinced if it is the best solution, So i would like to ask you guysfor advice.
Unfortunatelly i cannot put pictures nor links to code for the app, but i will do my best to explain myself:
The problems i encountered are mainly two:
All items appear to have fixed sizes applyed to them: When testing the app on different devices, the size of the elements is not responsive at all. In fact on small devices (Moto G5) There are elements that fall behind the bottom navigation bar making them unaccessible.
Lot of stuff fall below that said bottom navigation bar.
My question is the following:
Is react native responsive?
In web development there is a lot of flexibility when it comes to responsiveness with CSS and JS. Is React native any different? or there is a way to prepare the layout so it fits most of the common sizes without losing acces to interactions?
Hope i explained myself correctly. and again, sorry for not asking a technical specific question.
React Native is designed to be responsive, but it requires a different approach compared to web development. In web development, you can use CSS and JavaScript to make your website responsive, but in React Native, you use a different set of tools.
We have many ways to make the app responsive with the device's large screen and small screen.
Use the Dimensions API: React Native provides the Dimensions API, which allows you to get the dimensions of the screen at runtime. You can use this information to adjust the layout of your app based on the size of the screen.
Use third-party libraries ex: react-native-size-matters, react-native-responsive-screen, ...
Use Flexbox: React Native uses Flexbox for layout, just like web development. Flexbox is a powerful tool for creating responsive layouts that adapt to different screen sizes. You can use the flex property to adjust the size and position of elements on the screen.
In terms of your specific issue with elements falling behind the bottom navigation bar, it's likely that the layout is not taking the height of the navigation bar into account. You can use the Dimensions API to get the height of the navigation bar and adjust the layout accordingly.
I am very new to programming and I am currently using react native to make android applications. Now I am just testing out my code in my own physical smartphone. I want to know if it is more apt to use '%' unit in dimensions to properly scale apps in different phone sizes.
It depends upon your UI like how your UI is look like, But general approach is use react native default view property like flex, flexbox which have different property as per your UI so it will scale your UI in any point upto 99% of devices. Some of devices may very depend on resolution and screen height so for that you can use % in width and height but remember only specific condition not every where .
General View style you can refer this
https://reactnative.dev/docs/layout-props
https://reactnative.dev/docs/image-style-props
https://reactnative.dev/docs/shadow-props
https://reactnative.dev/docs/text-style-props
https://reactnative.dev/docs/view-style-props
For simple login screen UI you can refer this example so you can get idea how react native UI we can create generalize
https://code.tutsplus.com/tutorials/common-react-native-app-layouts-login-page--cms-27639
I'm creating a windows 10 xaml app. One of the views contains a webview which fetches some html.
My problem is that although the default theme on the app is set to dark, the scrollbar in the webview is always light, which jars against the rest of the UI.
I've tried setting the RequestedTheme=dark on the webview, but no joy
Unfortunately this isn't possible since the WebView is based off of Edge and Edge doesn't currently support it, as you can see here. If Edge gets this feature, you could simply insert a STYLE into your head element to define the color.
I am using bootstrap 3 for web mobile app.
Added my css for navbar drop down menu. Its working fine in most of the devices.
However when verified # Small tablet landscape (800x600) & Tablet portrait (768x1024), drop down menus are overlapping.
Please advise.
Also, I have added my code # http://jsfiddle.net/monicaRegal/y2s97xxk/
Thank You
Regards,
Monica Mandal
...you can either reduce the size of your elements so that they properly fit in multiple screens, or use another break point for switching to the mobile menu.
edit: elaboration:
I think the part 'reduce the size of your elements' is obvious.
In the bootstrap customizer before you download the files:
http://getbootstrap.com/customize/#media-queries-breakpoints
...you can customize the resolutions where the breakpoint will take place. Which means you can change the resolution where the navmenu changes to its mobile version.
As a new alternative, I would suggest to alter your design so that it fits your needs.
Second alternative, make the width STATIC instead of fluid down to a resolution where the mobile navigation will kick in.
What is the difference between <common:LayoutAwarePage and <UserControl... in XAML in Windows 8. Looks like both are used as W8 pages.
A Page is what you need to use inside of a Frame to support the standard navigation framework and the standard AppBar class. LayoutAwarePage adds support for different visual states depending on layout (portrait, landscape full/filled/snapped), which really is required when you are building an app to submit to the store.
A UserControl is just a simple way to group some UI pieces and code-behind together useful especially if you want to have a reusable piece of UI that shows up on different pages or if your page design becomes too complicated (eg. if you have a lot of XAML for different page layouts). It is also useful if you want to create a common control to be reused in multiple places or multiple projects, but don't care about being able to restyle it - then you would need to create a custom/templated control.
layoutawarepage are page that allow supports for the various view such as filled, snapped, portrait and landscape. in which you would have to handle the visualstatemanager in xaml and do the switching from various view in codebehind.
while usercontrol are elements that you can place in other pages.