答案 0 :(得分:9)
使用BitmapMesh canvas.drawBitmapMesh(..);它基本上是一个坐标网格。查看Api演示中的BitmapMesh.java以获取一个简单示例。
然后使用PathMeasure将坐标映射到一组路径以实现波浪效果。我希望有时间写一篇博文,并在未来开启窗帘。
答案 1 :(得分:0)
<com.hx.curtain.drawer.CurtainContentLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/curtain_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:behind_menu="@layout/menu_left"
app:content="@layout/layout_curtain_content"
app:h_waveCount="5"
app:maxRate="0.5"
app:v_waveCount="1.1" />