如何在android中的Imageview上制作正弦波? [英] How can I make sine wave on an Imageview in android?
本文介绍了如何在android中的Imageview上制作正弦波?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建与此类似的图片。
I want to create image similar to this.
是否可以用XML完成?如果没有,我将如何缩放这样形状的图像?
Is it possible to be done in XML? If not, how would I scale an image that is shape like this?
推荐答案
我有类似于此的东西不完全是same.hope这可以帮助你
i have something that's similar to this not exactly the same.hope this may help you
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:height="50dp"
android:gravity="bottom">
<shape android:shape="rectangle">
<solid android:color="#ffff0000" />
</shape>
</item>
<item
android:width="500dp"
android:height="60dp"
android:gravity="bottom|center_horizontal"
android:top="-0dp">
<shape android:shape="oval">
<solid android:color="#ffffffff" />
</shape>
</item>
<item
android:height="20dp"
android:bottom="30dp"
android:gravity="bottom">
<shape android:shape="rectangle">
<solid android:color="#ffffffff" />
</shape>
</item>
这篇关于如何在android中的Imageview上制作正弦波?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文