Xamarin Forms: UI issue when running app on iPad - xamarin.forms

My app UIs are working fine on mobile screen devices. But when running on big screen devices like tablet the UI is not looking good. It is very difficult to read the text in tablet and icon sizes are also small. If I increase the icon size and font size for the tablet, it also affects small screen devices.
Screenshot:
See the above screenshot: On iPhone, it is very easy to read the text and view icons. But on the iPad, the text and icons are not in a good visible format.
My app is mainly for kids and so I need icons and text in a good readable form. So how can I solve this problem in all the devices?
Uploaded my XAML file on here.

It's very complicated to separate UI for iPhone and iPad in Xamarin.Forms . You could use the class Device .
The Device class contains a number of properties and methods to help developers customize layout and functionality on a per-platform basis.
In your case , you can use the Device.Idiom .
For example if you want to set different font size on iPad and iPhone
<Label.FontSize>
<OnIdiom x:TypeArguments="x:Double"
Phone="20"
Tablet="40"/>
</Label.FontSize>
You can set different value of property in xaml or code behind .For more details you can check https://learn.microsoft.com/en-us/xamarin/xamarin-forms/platform/device#deviceidiom

Related

Broken mobile responsiveness in iOS only

I'm experiencing a weird issue with the mobile responsive layout of a website.
The address is https://melec.vercel.app/
On desktop using dev tools > responsive, it works correctly, also on any android device you get the correct mobile experience but in iOS devices (tested on 2 iphones) the website renders incorrectly, it seems to have the double of the actual available screen width.
For reference I'm using tailwindcss, tailwindui and nextjs.
In this image you can see the scroll bar for horizontal movement.
Here you can see how I can freely move horizontally, this doesn't happen on dev tools or android devices.
Also when I press the mobile burger the whole layout shrinks a bit.
it is because the top part "flex-shrink-0 flex items-center".
I entered a "max-width: 100%;".

Using Xamarin Forms, maintain aspect ratio of Navigation Page Title Icon in Landscape on iPhone X

When running a Xamarin Forms app that uses a TitleIcon on a Navigation Page, the image is squished when the device is turned to landscape mode. What do I need to do to maintain the aspect ratio of the image as it does with previous devices?
iPhone 8 Portrait:
iPhone 8 Landscape:
iPhone X Portrait:
iPhone X Landscape:
For these kinds of customizations, I think you might be better off avoiding the built in NavigationPage NavigationBar and instead implement your own navigationbar in XAML. It would be relatively simple to just use a grid or absolutelayout with your desired background color and image and place it at the top of your pages. You could use a control template or a reusable content view to avoid copying and pasting the bar to every page. Once you've got that done you just have to hide the default navigationbar by using
NavigationPage.SetHasNavigationBar(myPage, false);
Or by adding this to the top of your content page definition in XAML
NavigationPage.HasBackButton="False"
Something like this might help you get started:
http://lukealderton.com/blog/posts/2017/january/replacing-the-xamarin-headernavigation-bar-with-a-custom-viewtemplate/

Hex Code display size issue in mobile

I am using ✕ on my close button. In my chrome pc it displays the size that I wanted (font-size:20px) see the image below
However in my mobile I also use chrome but the size is smaller even they are the same page and I also check the view in desktop site but still the size is small see the image below
Js fiddle example https://jsfiddle.net/reginaldt/cag7870j/
codepen link: http://codepen.io/reginaldt/pen/yaJqyo
Any reason for this? Thanks.
UPDATE: I used samsung galaxy core prime on the mobile view to replicate the problem. But when I used samsung galaxy s6, it display the size properly.

Responsive desktop app using Kony

we have a mobile application developed using Kony. We are trying to port the same to desktop version. Everything goes well but there are small challenges wrt UI i.e., responsive UI. Since I am new to Kony please guide me if there is a way to include media queries in a Kony application or what could be trick to make the app responsive on browser.
Thanks.
Kony does not currently support media queries to say "for screens of this size use this css rules". Remember in Kony your styling is done with skinning, not CSS3. Skins do translate into css for web apps, but that's a different story.
In Kony the approach is different. You design your forms for different screen sizes based on the type of mobile device: Mobile phone, tablet, desktop, watch, etc.
If you come from a web development background like I do, you might even be expecting a grid system like in Bootstrap or Foundation. But bear in mind that the real value of responsive design is not having to worry about the resolution of the screen, except Kony already gives you this through the use of Dp units instead of pixels. So the same mobile form design will adapt to any mobile device resolution. The same tablet form will adapt to any tablet resolution and so on.
For different device types, the premise is that your desktop and mobile screens will most likely be very different, or even start alike but evolve differently over time.
So the solution is to just copy your form from the "Mobile" subtree (right-click>copy) and paste it under the "Desktop" subtree. Then you'll be able to edit them independently.
I hope this helps.
Edit:
Starting with Visualizer V8 SP2 Kony does support Responsive Design.

customizing bootstrap columns in portrait orientation for mobile devices

Task: Trying to make a mobile webpage: http://jsfiddle.net/anujbhai/hgaH7/3/ (also include jQuery & Bootstrap files in order to run properly).
Problem: Page should change layout according to Orientation - in landscape mode
<div id="videoThumbs">...</div>
will show 2 thumbnails and snaps beneath the
<div id="billboard">...</div>
while in the portrait mode the latter goes to the left of the screen and the former now shows only one thumbnail, appearing like a sidebar.
This is very hard to do with just mediaqueries and Bootstrap. I can't figure out a proper logic to be applied via JavaScript. Please help.
You can try using the default Bootstrap responsive utility classes.
Take a look at the documentation:
http://getbootstrap.com/css/#responsive-utilities-classes
http://getbootstrap.com/css/#grid-options
Small and Extra small devices classes can work for portrait tablet view and Small and Medium devices classes can works for landscape mode, you need to try various combinations.
Obviously, depends on the screen size of the tablet, but this works excellent in 7" and 9" tablets.

Resources