前言

根据前面两篇文章,这里进行组合也就是倒影+旋转,顺便加上了倒影渐变。

效果如图。

Android图片旋转+倒影

正文

直接上代码

<!--  layout_height= 倒影高度+分割线高度+图片高度,否则显示不全  -->

<com.biumall.reflectview.view.RotateReflectView
    android:id="@+id/main_reflect_view"
    android:layout_width="250dp"
    android:layout_height="304dp"
    android:background="@android:color/darker_gray"
    app:interval_height="4dp"
    app:reflect_height="50dp"
    app:reflect_linear_gradient="true"
    app:reflect_rotation_degree="-20.0" />

<com.biumall.reflectview.view.RotateReflectView
    android:id="@+id/main_reflect_view_2"
    android:layout_width="250dp"
    android:layout_height="304dp"
    android:layout_marginTop="40dp"
    android:background="@android:color/darker_gray"
    app:interval_height="4dp"
    app:reflect_height="50dp"
    app:reflect_linear_gradient="true"
    app:reflect_rotation_degree="20.0" />
  1. interval_heighth是分割线高度

  2. reflect_height是倒影高度

  3. reflect_linear_gradient 倒影是否渐变

  4. reflect_rotation_degree 旋转角度

隐藏内容!
付费阅读后才能查看!
2
多个隐藏块只需支付一次

参考文章

相关文章

暂无评论

none
暂无评论...