如何在android中创建六边形imageview?

时间:2016-06-30 11:31:40

标签: android imageview

我对Android很新,任何人都可以告诉我如何在图像中创建如图所示的六角形视图。

enter image description here

1 个答案:

答案 0 :(得分:2)

Shape Image View可以帮助您满足您的要求

<com.github.siyamed.shapeimageview.{ClassName}
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:layout_margin="8dp"
   android:src="@drawable/neo"
   app:siBorderWidth="8dp"
   app:siBorderColor="@color/darkgray"/>

enter image description here

在您的情况下,您可以使用com.github.siyamed.shapeimageview.HexagonImageView

还有很多其他可用的形状,请参考该库以获取更多详细信息。

请查看CustomShapeImageView

相关问题