FaceView
Introduction
FaceView is a zoom library to face for Android made using Google Vision Library.
How to get?
Step 1.
Add the JitPack repository to your build file
Add it to your root build.gradle at the end of repositories:
allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
Step 2.
Add the dependency
dependencies {
implementation 'com.github.NAndroidEx:FaceView:1.0.0'
}
How to use it?
XML
<com.nandroidex.faceview.FaceView
android:id="@+id/fvFace"
android:layout_width="150dp"
android:layout_height="150dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Params
Kotlin
fvFace.setImageResource(R.drawable.rock)
//or
fvFace.setImageResource(R.drawable.rock)
//or
fvFace.setImageDrawable(ActivityCompat.getDrawable(this, R.drawable.rock))
//or
fvFace.setImageBitmap(BitmapFactory.decodeResource(resources,R.drawable.rock))
//or
Glide.with(this).load(R.drawable.rock).into(fvFace)
do not use android:src=”image”, use on your code.
Your contributions are welcome.
Demo App
I have prepared a Demo App for you.