parent
e3aaffc310
commit
25a7b087fa
@ -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…
Reference in new issue