|
|
|
@ -119,6 +119,8 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL |
|
|
|
|
|
|
|
|
|
|
|
val row = this.model.rowRepresentableForPosition(it.index) as HandHistoryRow |
|
|
|
val row = this.model.rowRepresentableForPosition(it.index) as HandHistoryRow |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// row.performActionForTag(it.tag) |
|
|
|
|
|
|
|
|
|
|
|
row.keyboardForTag(it.tag)?.let { keyboard -> |
|
|
|
row.keyboardForTag(it.tag)?.let { keyboard -> |
|
|
|
|
|
|
|
|
|
|
|
when (keyboard) { |
|
|
|
when (keyboard) { |
|
|
|
@ -549,6 +551,9 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL |
|
|
|
this.findNextActionToEdit(0) |
|
|
|
this.findNextActionToEdit(0) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
|
|
|
|
* Shows a popup with the various export options |
|
|
|
|
|
|
|
*/ |
|
|
|
private fun exportHand() { |
|
|
|
private fun exportHand() { |
|
|
|
|
|
|
|
|
|
|
|
val builder: AlertDialog.Builder = AlertDialog.Builder(context) |
|
|
|
val builder: AlertDialog.Builder = AlertDialog.Builder(context) |
|
|
|
@ -572,6 +577,50 @@ class HandHistoryFragment : RealmFragment(), RowRepresentableDelegate, KeyboardL |
|
|
|
|
|
|
|
|
|
|
|
private fun videoExport() { |
|
|
|
private fun videoExport() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Timber.d("**** Start video test") |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// val width = 480 |
|
|
|
|
|
|
|
// val height = 480 |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// val bitmap = Bitmap.createBitmap(480, 480, Bitmap.Config.ARGB_8888) |
|
|
|
|
|
|
|
// val canvas = Canvas(bitmap) |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// val paint = Paint() |
|
|
|
|
|
|
|
// paint.isAntiAlias = true |
|
|
|
|
|
|
|
// paint.style = Paint.Style.STROKE |
|
|
|
|
|
|
|
// paint.strokeWidth = 20.0.toFloat() |
|
|
|
|
|
|
|
// paint.color = requireContext().getColor(R.color.blue) |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// canvas.drawRect(Rect(0,0, width, height), paint) |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// bitmap.let { |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// val muxer = MMediaMuxer() |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// Timber.d("width = ${it.width}, height = ${it.height}") |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// val width = (it.width / 2) * 2 |
|
|
|
|
|
|
|
// val height= (it.height / 2) * 2 |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// muxer.Init(requireActivity(), width, height, "hhVideo", "YES!") |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// Timber.d("**** Adds frames") |
|
|
|
|
|
|
|
// for (i in 0..50) { |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// try { |
|
|
|
|
|
|
|
// val byteArray = it.toByteArray() |
|
|
|
|
|
|
|
// muxer.AddFrame(byteArray) |
|
|
|
|
|
|
|
// } catch (e: Exception) { |
|
|
|
|
|
|
|
// Timber.e("error = ${e.message}") |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// Timber.d("**** Create video") |
|
|
|
|
|
|
|
// muxer.CreateVideo() |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// val path = muxer.GetPath() |
|
|
|
|
|
|
|
// Timber.d("**** Video path = $path") |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun gifExport() { |
|
|
|
private fun gifExport() { |
|
|
|
|