Bug 23547 - Values folders (Values-large Values-xlarge) work in the Designer, but not in the compiled application.
Summary: Values folders (Values-large Values-xlarge) work in the Designer, but not in ...
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: Designer ()
Version: 4.18.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2014-10-02 07:53 UTC by Simon Demeulemeester
Modified: 2017-03-03 09:57 UTC (History)
2 users (show)

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


Attachments
example of the bug (841.99 KB, image/png)
2014-10-02 07:53 UTC, Simon Demeulemeester
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 NORESPONSE

Description Simon Demeulemeester 2014-10-02 07:53:35 UTC
Created attachment 8282 [details]
example of the bug

Hi!

If you create differents "values" folders with differents Dimens.xml files inside (like attachment image n°1), the designer will recognize and use the needed size for the differents device size.

I.E : If you use a 7 inches tablet, the designer will apply the dimension of the values-large, if you use a 10 inches tablet, the designer will apply the dimension of the values-xlarge folder, etc etc...
(like attachment image n°2)

But when you compile the application and try it on your phone or tablet, it just doesn't work. It only uses the values of the normal "values" folder (attachment image n°3)

Borring bug ! :/
Comment 1 Simon Demeulemeester 2014-10-08 08:13:51 UTC
Steps to reproduce:
- Create an android activity with a layout
- Create diffents "values" folder like these : 
   - values-large
   - values-xlarge
   - values-small
- Inside each of these newly created folders, put an Dimens.xml looking like these ones : 

For values-large
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
    <dimen name="example_padding">10dp</dimen>
</resources>

For values-xlarge
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
    <dimen name="example_padding">50dp</dimen>
</resources>


- Put a linearlayout (or any kind of layout) and set the padding to the value "example_padding"
 (@dimen/example_padding)


Expected Result:
values of the padding despending of the size-type of the device (small, normal, large, xlarge, etc etc).

Actual Result:
Works on the Designer, not on the compilation. Using the values of the normal values folder.
Comment 2 Arpit Jha 2014-11-06 00:13:05 UTC
We have checked this issue and observed that padding properties  value only showing the values folder example_padding of 40 dp.

I have tried following steps to reproduce this issue.
1.Create a Xamarin .Android Application.
2.Add Value-large ,Values-Xlarge directory in Resources Directory.
3.Add dimens.xml file in values,values-large,values-xlarge and did some code.
In Values/dimens.xml 
<resources>
  <dimen name="example_padding">40dp</dimen>
</resources>
In Values-large/dimens.xml
<resources>
  <dimen name="example_padding">10dp</dimen>
</resources>
In values-xlarge/dimens.xml
<resources>
  <dimen name="example_padding">50dp</dimen>
</resources>


we observed that we are getting only values folder value in properties of Image to set padding.

Please let me know if I missed anything to reproduce?
Could please provide us a sample project with environment Info ,So that I can able to reproduce at my end?

Environment Info:

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

Xamarin   3.7.248.0 (8ca7d11db8a6f874c6cd2de6d9ca0f511867ce91)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.18.1.3 (5474129af31e9d3a86cb7482c7c5c7a30ad315f1)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.4.0.0 (209abebbd8f1a292d042420edb45fa5fbd3f017b)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 3 Arpit Jha 2014-11-06 00:17:01 UTC
Screencast regarding same:
http://screencast.com/t/iWqlwU9J0eu
Comment 4 Lluis Sanchez 2017-03-03 09:57:32 UTC
Closing.