Bug 18426 - Designer is not showing widget backgrounds
Summary: Designer is not showing widget backgrounds
Status: RESOLVED DUPLICATE of bug 10606
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Designer ()
Version: 4.2.3
Hardware: PC Windows
: Normal normal
Target Milestone: master
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2014-03-17 11:29 UTC by Tracy
Modified: 2014-05-08 13:04 UTC (History)
2 users (show)

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


Attachments
Test Project (21.51 KB, application/x-zip-compressed)
2014-03-19 04:54 UTC, Shruti
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 DUPLICATE of bug 10606

Description Tracy 2014-03-17 11:29:10 UTC
When setting a background to a button/TextView/etc to an XML file like the following, the button's backgrounds are not drawn in the designer. This makes it difficult to see how things are being laid out.
This appears to be an issue whether there is a selector or just a single shape.

----------------------btn_gradient.xml------------------------------
<?xml version="1.0" encoding="utf-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <item android:state_pressed="true">
    <shape>
      <solid android:color="#2c68e7"/>                      
      <stroke android:width="1dp" android:color="#CCB00E"/>                    
      <corners android:radius="8dp"/>                      
      <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp"/>
    </shape>
  </item>
  <item android:state_enabled="false">
    <shape>
      <solid android:color="#C7C7C7"/>                      
      <stroke android:width="1dp" android:color="#CCB00E"/>                    
      <corners android:radius="8dp"/>                      
      <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp"/>
    </shape>
  </item>
  <item>
    <shape>
      <gradient android:startColor="#859dbc" android:endColor="#4a6c9b" android:angle ="270"/>
      <stroke android:width="1dp" android:color="#CCB00E"/>
      <corners android:radius="8dp"/>
      <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp"/>
    </shape>
  </item>
  
</selector>
----------------------btn_gradient.xml------------------------------
Comment 1 Shruti 2014-03-19 04:54:46 UTC
Created attachment 6350 [details]
Test Project
Comment 2 Shruti 2014-03-19 05:05:05 UTC
I have checked this issue with following steps but not reproduced

1. Created new Android Application.
2. Created  new xml file 'new_button.xml' in Resources >> Drawable.
3. Copied all above content of btn_gradient.xml in new_button.xml file.
4. Added new_button in background of button  in Main.axml file.
5. Launched the application.
6. Clicked on button. Background color was appearing as per given in xml file.
7. Now , disable the button  in Activity.xml file.
8. Again, Launched the application.
9. Now button is disabled and background color was appearing as per given in xml file.

Screen Cast Info : http://screencast.com/t/23b41rtkQuU

Attachment Project : Project is attached in Comment 1

Environment Info : 
Visual Studio 2013 Professional
X.Android : 4.12.02001(a1e3982a)
XS : 4.2.3 (build 60)


Please provide more information to reproduce this issue if anything is missed in above mentioned steps.
Comment 3 Tracy 2014-04-01 09:06:01 UTC
Please re-read my initial post.
I do not have a problem with it showing up when deployed to a device.
The issue is in the DESIGNER.

As per the bug report, this is an error in the Xamarin Studio designer.
When I am laying out the UI in the designer it does not show anything other than the white text on a black background. This makes it very difficult to see where I am placing UI elements.
Comment 4 Lluis Sanchez 2014-05-08 13:04:50 UTC
Dup

*** This bug has been marked as a duplicate of bug 10606 ***