File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
compose/snippets/src/main/java/com/example/compose/snippets/text Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ package com.example.compose.snippets.text
1818
1919import android.text.TextUtils
2020import androidx.compose.foundation.layout.Column
21+ import androidx.compose.foundation.layout.Spacer
22+ import androidx.compose.foundation.layout.height
2123import androidx.compose.foundation.layout.padding
2224import androidx.compose.foundation.text.KeyboardOptions
2325import androidx.compose.foundation.text.input.InputTransformation
@@ -95,9 +97,16 @@ fun ConfigureLineLimits() {
9597 )
9698 // [END android_compose_state_text_3]
9799
100+
101+ }
102+
103+ @Preview
104+ @Composable
105+ fun Multiline () {
106+ Spacer (modifier = Modifier .height(15 .dp))
98107 // [START android_compose_state_text_4]
99108 TextField (
100- state = rememberTextFieldState(),
109+ state = rememberTextFieldState(" Hello \n World \n Hello \n World " ),
101110 lineLimits = TextFieldLineLimits .MultiLine (1 , 4 )
102111 )
103112 // [END android_compose_state_text_4]
You can’t perform that action at this time.
0 commit comments