Reputation: 25
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.
Upvotes: 1
Views: 1687
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