繁体   English   中英

在Android中使用xml定义(可绘制)制作具有矩形形状的视图

[英]Make a view with rectangle shape using xml definitions (drawable) in Android

https://drive.google.com/file/d/0B0vP0ppNf8G3MFdBRmF5WkJEZ3c/view?usp=sharing

我想如上所述创建形状。 如何使用xml创建此文件?

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:right="-100dp">
        <rotate
            android:fromDegrees="-5"
            android:pivotX="0%"
            android:pivotY="100%">
            <shape android:shape="rectangle">
                <solid android:color="#f9c" />
            </shape>
        </rotate>
    </item>
</layer-list>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM