How can i convert export and save a path animation as video /mp4 file? I use this library to create animation https://github.com/totond/TextPathView/blob/master/README-en.md . I want to record the animation without screen casting.
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".TestActivity">
<yanzhikai.textpath.SyncTextPathView
android:id="@+id/test2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:duration="6000"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/spv"
app:paintStrokeColor="#F44336"
app:pathStrokeColor="#F44336"
app:showPainter="true"
app:text="Android"
app:textInCenter="true"
app:textSize="75sp" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text="Start"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
activity code
class TestActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_test)
spv.setPath(yanzhikai.textpathview.path.TestPath())
spv.setPathPainter(FireworksPainter())
test.setPathPainter(FireworksPainter())
test2.setPathPainter(FireworksPainter())
button.setOnClickListener {
test.startAnimation(0f, 1f)
test2.startAnimation(0f, 1f)
spv.startAnimation(0f, 1f)
}
}
}