mirror of
https://github.com/BetterAndroid/Hikage.git
synced 2025-09-06 10:45:26 +08:00
feat: add LP generic function in ViewGroup
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user