Laurent 5 years ago
parent e3aaffc310
commit 25a7b087fa
  1. 2
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/HandStep.kt
  2. 1
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/ReplayerView.kt
  3. 53
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/views/VideoView.kt

@ -1,7 +1,5 @@
package net.pokeranalytics.android.ui.modules.handhistory.replayer
import android.content.Context
import android.graphics.Canvas
import net.pokeranalytics.android.model.handhistory.Street
import net.pokeranalytics.android.model.realm.handhistory.Action
import net.pokeranalytics.android.model.realm.handhistory.HandHistory

@ -20,7 +20,6 @@ class ReplayerView(context: Context, attrs: AttributeSet) : View(context, attrs)
init {
this.viewTreeObserver.addOnGlobalLayoutListener {
this.animator.configure(width.toFloat(), height.toFloat(), context)
// this.drawer.configurePaints(context, this.animator)
}
}

@ -1,53 +0,0 @@
package net.pokeranalytics.android.ui.modules.handhistory.views
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.FrameLayout
import net.pokeranalytics.android.R
import timber.log.Timber
class VideoView : FrameLayout {
/**
* Constructors
*/
constructor(context: Context) : super(context) {
init()
}
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
init()
}
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
init()
}
private fun getResourceLayout(): Int {
return R.layout.view_video
}
private lateinit var frameLayout: FrameLayout
/**
* Init
*/
private fun init() {
this.setBackgroundColor(context.getColor(R.color.blue))
val layoutInflater = LayoutInflater.from(context)
frameLayout = layoutInflater.inflate(getResourceLayout(), this, false) as FrameLayout
// val layoutParams = LayoutParams(480, 480)
val width = frameLayout.layoutParams.width
val height = frameLayout.layoutParams.height
Timber.d("W = $width, H = $height")
this.layoutParams = frameLayout.layoutParams
addView(frameLayout, frameLayout.layoutParams)
}
}
Loading…
Cancel
Save