|
|
@ -18,17 +18,20 @@ import java.util.* |
|
|
|
|
|
|
|
|
|
|
|
class ContentView : FrameLayout { |
|
|
|
class ContentView : FrameLayout { |
|
|
|
|
|
|
|
|
|
|
|
private val bgImage: AppCompatImageView by lazy { |
|
|
|
private val bgImage: AppCompatImageView = AppCompatImageView(context) |
|
|
|
val iv = AppCompatImageView(context) |
|
|
|
.apply { |
|
|
|
iv.scaleType = ImageView.ScaleType.CENTER_CROP |
|
|
|
scaleType = ImageView.ScaleType.CENTER_CROP |
|
|
|
iv |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
constructor(context: Context) : super(context) |
|
|
|
constructor(context: Context) : super(context) |
|
|
|
|
|
|
|
|
|
|
|
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) |
|
|
|
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) |
|
|
|
|
|
|
|
|
|
|
|
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) |
|
|
|
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super( |
|
|
|
|
|
|
|
context, |
|
|
|
|
|
|
|
attrs, |
|
|
|
|
|
|
|
defStyleAttr |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
init { |
|
|
|
init { |
|
|
|
addView(bgImage, LayoutParams(matchParent, matchParent)) |
|
|
|
addView(bgImage, LayoutParams(matchParent, matchParent)) |
|
|
|