elye
11/16/2021, 11:21 AMclass CustomView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0)
: View(context, attrs, defStyleAttr) {
// Some Jetpack Compose drawn item
}
I have also check in https://stackoverflow.com/q/69987040/3286489Chris Fillmore
11/16/2021, 11:45 AMDmitrii Smirnov
11/16/2021, 12:08 PMAbstractComposeView
and override Content
functionelye
11/16/2021, 12:27 PMDmitrii Smirnov
11/16/2021, 12:28 PMclass CustomView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0)
: AbstractComposeView(context, attrs, defStyleAttr) {
@Composable
override fun Content {
//compose code here
}
}
elye
11/16/2021, 12:29 PM