请在Android的使用矩形XML定义(绘制)视图 [英] Make a view with rectangle shape using xml definitions (drawable) in Android
本文介绍了请在Android的使用矩形XML定义(绘制)视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
https://drive.google.com/file/d/ 0B0vP0ppNf8G3MFdBRmF5WkJEZ3c /看法?USP =共享
我要如上打造成型。
你如何创建这个XML使用?
解决方案
<?XML版本=1.0编码=UTF-8&GT?;
<层列表的xmlns:机器人=http://schemas.android.com/apk/res/android>
<项目
机器人:右= - 100dp>
<旋转
机器人:fromDegrees = - 5
机器人:pivotX =0%
机器人:pivotY =100%>
<形状机器人:形状=矩形>
[固体机器人:颜色=#f9c/>
< /形状>
< /旋转>
< /项目>
< /层列表>
https://drive.google.com/file/d/0B0vP0ppNf8G3MFdBRmF5WkJEZ3c/view?usp=sharing
I want to create shape as above. How do you create this using 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>
这篇关于请在Android的使用矩形XML定义(绘制)视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文