I am quite new to android, can anyone please tell me how to create hexagonal view like bellow in the image.
Asked
Active
Viewed 1,128 times
1
-
try using path class and porterduff – Sarthak Mittal Jun 30 '16 at 11:32
1 Answers
3
Shape Image View can help you with your requirement
<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"/>
in your case you can use com.github.siyamed.shapeimageview.HexagonImageView
There are lot other shapes available, refer that library for more detail.
Have a look at CustomShapeImageView also

Ravi
- 34,851
- 21
- 122
- 183
-
Thanks for your answer. But how can I rotate it like in the image – Akshaykumar Maldhure Jun 30 '16 at 13:03
-
you can use `android:rotation` property of `ImageView`, as `HexagonImageView` also extends same class. – Ravi Jun 30 '16 at 13:06
-
You r right , but when I rotate it using android : rotation it also rotates image – Akshaykumar Maldhure Jun 30 '16 at 13:20
-
-