feat: add LP generic function in ViewGroup

This commit is contained in:
2025-08-23 21:22:05 +08:00
parent 51a59b672c
commit 0529d6a2b6
3 changed files with 15 additions and 3 deletions

View File

@@ -219,7 +219,7 @@ Or, use in a custom `View`.
class CustomView(context: Context, attrs: AttributeSet? = null) : FrameLayout(context, attrs) {
init {
addView {
addView<FrameLayout.LayoutParams> {
TextView {
text = "Hello, World!"
textSize = 16f

View File

@@ -217,7 +217,7 @@ root.addView {
class CustomView(context: Context, attrs: AttributeSet? = null) : FrameLayout(context, attrs) {
init {
addView {
addView<FrameLayout.LayoutParams> {
TextView {
text = "Hello, World!"
textSize = 16f