-3

Playstore like shapes

How to create these download, rating , Media & Video and similar kind of shapes in android ? Is there any library available to do that ?

Thanks in advance.

  • 3
    One of I know is : [android-shape-imageview](https://github.com/siyamed/android-shape-imageview) and of course [CircleImageView](https://github.com/hdodenhof/CircleImageView) also you can use [floating-action-buttons](https://guides.codepath.com/android/floating-action-buttons) – Yasin Kaçmaz Sep 25 '16 at 11:38
  • For media & video you can use floatingactionbutton that is provided by support library. https://developer.android.com/reference/android/support/design/widget/FloatingActionButton.html – USKMobility Sep 25 '16 at 11:39
  • do you want this kind of desing or shapes of icons ? – Amit Vaghela Sep 25 '16 at 11:44
  • I know how to create rectangle and circle. I'm actually looking for some pointers to create the shapes like ratings in this image and also downloads kind of shape. – Sai Ganesh Pittala Sep 25 '16 at 11:46
  • It would be great if there is a library available to draw shapes with text – Sai Ganesh Pittala Sep 25 '16 at 11:47
  • I think @Yasin Kaçmaz will help you. – Amit Vaghela Sep 25 '16 at 12:19
  • 1
    @SaiGaneshPittala if you want to draw both texts and custom shapes you must work with canvas. Canvas have drawText method : [android-canvas-drawtext](http://stackoverflow.com/questions/2655402/android-canvas-drawtext). Also another approach is using a layout with drawing canvas and setting background then add another views to it. Im not home right now but try theese thing and edit your question then so many guys help you much easily with given code – Yasin Kaçmaz Sep 25 '16 at 13:39
  • @YasinKaçmaz will sure try canvas. Thanks. – Sai Ganesh Pittala Sep 26 '16 at 04:01

1 Answers1

1

Have look at this library. Its very easy to use.

<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"/>

You can put following classes in place of {ClassName}
1. BubbleImageView
2. CircularImageView
3. DiamondImageView
4. HeartImageView
5. HexagonImageView
6. OctogonImageView
7. PentagonImageView
8. RoundedImageView
9. StarImageView
etc

Nikhil
  • 3,711
  • 8
  • 32
  • 43