Bug 13499 - layout_weight is not validating values correctly
Summary: layout_weight is not validating values correctly
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Designer ()
Version: 4.8.x
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2013-07-26 06:17 UTC by Goncalo Oliveira
Modified: 2014-03-27 06:55 UTC (History)
3 users (show)

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

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:
VERIFIED FIXED

Description Goncalo Oliveira 2013-07-26 06:17:11 UTC
Consider the following layout

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/linearLayout1">
        <Button
            android:id="@+id/button1"
            android:text="Button1"
            android:layout_width="0dp"
            android:layout_weight="0.5"
            android:layout_height="wrap_content" />
        <Button
            android:id="@+id/button2"
            android:text="Button2"
            android:layout_width="0dp"
            android:layout_weight="0.5"
            android:layout_height="wrap_content" />
    </LinearLayout>

A very simple example with two buttons, each taking 50% of the full width. Plain and short, this can't be done in the designer. It does not allow a decimal value with Invariant culture; at least, I'm aiming at that, since I'm using a computer with Portuguese regional settings where the decimal separator is a comma ( , ) - if I type 0,5 it accepts the value, but it obviously doesn't work.

This was not an issue in the previous version.

Using stable version 4.8.00013
Comment 1 Lluis Sanchez 2013-08-29 12:15:53 UTC
This has been fixed. A fix will be included in upcoming releases.
Comment 2 Udham Singh 2014-03-27 06:55:42 UTC
I have checked this issue on following builds:

Windows 8.1
Xamarin Studio : 4.2.3 (build 60)
Xamarin.Android: 4.13.0 (Business Edition)

screencast: http://screencast.com/t/ZKKPZpwRSwQ9

This issue is working fine. Hence, I am closing this issue.