前言

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

效果如图。

Android图片旋转+倒影

正文

直接上代码

  1. <!-- layout_height= 倒影高度+分割线高度+图片高度,否则显示不全 -->
  2. <com.biumall.reflectview.view.RotateReflectView
  3.   android:id="@+id/main_reflect_view"
  4.   android:layout_width="250dp"
  5.   android:layout_height="304dp"
  6.   android:background="@android:color/darker_gray"
  7.   app:interval_height="4dp"
  8.   app:reflect_height="50dp"
  9.   app:reflect_linear_gradient="true"
  10.   app:reflect_rotation_degree="-20.0" />
  11. <com.biumall.reflectview.view.RotateReflectView
  12.   android:id="@+id/main_reflect_view_2"
  13.   android:layout_width="250dp"
  14.   android:layout_height="304dp"
  15.   android:layout_marginTop="40dp"
  16.   android:background="@android:color/darker_gray"
  17.   app:interval_height="4dp"
  18.   app:reflect_height="50dp"
  19.   app:reflect_linear_gradient="true"
  20.   app:reflect_rotation_degree="20.0" />
复制
  1. interval_heighth是分割线高度

  2. reflect_height是倒影高度

  3. reflect_linear_gradient 倒影是否渐变

  4. reflect_rotation_degree 旋转角度

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

参考文章

相关文章

暂无评论

none
暂无评论...