MasayukiSuda / CameraRecorder-android

Video Recording with Camera2 and apply video filter.
MIT License
254 stars 73 forks source link

How to show Camera View circular shape ? #24

Open RahulChokshiDev opened 4 years ago

sathishmscict commented 3 years ago

Its very simple :

<androidx.cardview.widget.CardView android:id="@+id/cvVideoView" android:layout_width="@dimen/_280sdp" android:layout_height="@dimen/_280sdp" android:layout_marginStart="@dimen/_6sdp" android:layout_marginTop="8dp" android:layout_marginEnd="@dimen/_6sdp" app:cardCornerRadius="@dimen/_200sdp" app:cardPreventCornerOverlap="false" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="1.0">

    <com.daasuu.sample.widget.PortraitFrameLayout
        android:id="@+id/wrap_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"></com.daasuu.sample.widget.PortraitFrameLayout>

</androidx.cardview.widget.CardView>

Add below dependencies and convery your project to androidx support or made changes accordingly. Above code working fine for me : implementation 'androidx.cardview:cardview:1.0.0' implementation "com.intuit.sdp:sdp-android:1.0.6"

image