开发者

How to draw a table layout with borders in Mono-android using C#?

开发者 https://www.devze.com 2023-03-27 03:27 出处:网络
How to draw a table layout with borders in Mono-android using C#? Shap开发者_StackOverflow社区e tag not working. I have written following code in a separate .xml file, but it shows \" Shape tag is no

How to draw a table layout with borders in Mono-android using C#?

Shap开发者_StackOverflow社区e tag not working. I have written following code in a separate .xml file, but it shows " Shape tag is not declared"

<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">

    <solid android:color="#99FFFFFF"/>
    <corners android:radius="30px"/>
    <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" />
</shape>


As the error message says, you're missing the /shape/android:shape attribute Try using this as the contents of your .xml file:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="rectangle">
    <solid android:color="#99FFFFFF"/>
    <corners android:radius="30px"/>
    <padding
            android:left="0dp"
            android:top="0dp"
            android:right="0dp"
            android:bottom="0dp" />    
</shape>

See also the Android Shape Drawable documentation.

0

精彩评论

暂无评论...
验证码 换一张
取 消