Bug 9549 - Enhancement request - support for relative widths wanted. Like Standard MS C# XAML.
Summary: Enhancement request - support for relative widths wanted. Like Standard MS C#...
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Android
Classification: Xamarin
Component: Designer ()
Version: 4.8.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2013-01-14 09:57 UTC by Øyvind Thorsen
Modified: 2013-03-12 13:50 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
A test of my week layout on a Samsung Galaxy S3 (84.12 KB, image/png)
2013-01-14 09:57 UTC, Øyvind Thorsen
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_ON_ROADMAP

Description Øyvind Thorsen 2013-01-14 09:57:52 UTC
Created attachment 3214 [details]
A test of my week layout on a Samsung Galaxy S3

I have made a custom row layout for a Listview with 8 "columns". A week layout - project and 7 days. I wanted to have the opportunity to enter each column width in relation. We can do that in MS VS2012 Windows WPF XAML.  

Xamarin does not support any way to tell what width each cell (row item) should have in percent of actual device width - both vertical and horizontal. Standard C# xaml allow to enter a relative width like this - field1 "2*" field2 "1*" (meaning f1 gets 67% of width and f2 33%)

Example with 8 columns (a week layout)

Field #  Field Name       Field width
1        Description      3*
2        Day1             1*
3        Day2             1* 
4        Day3             1*
5        Day4             1*
6        Day5             1*
7        Day6             1*
8        Day7             1*

Sum relative field units = 10. -> Each * (unit) gets 10% of physical width.

Description gets 30% of physical width.

Automatically fixed swapping from vertical to horizontal view.
Comment 1 Lluis Sanchez 2013-03-12 13:50:56 UTC
Android doesn't support specifying column widths in that way. It is not a limitation in Xamarin, but in Android. There are other ways of building the UI you described. If you need help about how to do it, you can try asking in the Xamarin forums: http://forums.xamarin.com.