Ashutosh Singh
Ashutosh Singh

Reputation: 25

How to make a circular framelayout and capture a circular image using a custom camera API?

I am working on one camera app and capturing image using custom camera api. For preview I am using frame layout.I want to make that frame layout which is circular as shown in the image and show preview in circular frame layout.Please help.

enter image description here

Upvotes: 1

Views: 1687

Answers (1)

Afinas EM
Afinas EM

Reputation: 3215

You want to change your view to circle, Right?

I found a library that can change your views to custom shapes.

link : https://github.com/florent37/ShapeOfView

    <com.github.florent37.shapeofview.shapes.CircleView
        android:layout_width="150dp"
        android:layout_height="150dp"

        android:elevation="4dp"
        app:shape_circle_borderColor="@android:color/black"
        app:shape_circle_borderWidth="2dp">

            <!-- YOUR CONTENT -->

</com.github.florent37.shapeofview.shapes.CircleView>

Upvotes: 1

Related Questions