What's the keyboard shortcut to wrap a composable in a Col or Row quickly?
I highlighted a Text("adsf") and wanted to "surround with" with a Column. I thought there was a way to do this out of the box? I searched slack but only result was regarding a plugin, but I thought this came out of the box?
Am I looking in the right spot? I don't see AndroidCompose? And is that keyboard shortcut for macOS or windows?
k
knthmn
04/05/2021, 1:25 PM
You can add your own live templates for whatever tasks you want. There are presets that come with the installation, the compose ones probably didn't exist when you installed Android Studio.
The "surround with column" looks like this
Copy code
$WIDGET$ {
$SELECTION$$END$
}
where
$WIDGET$
is a defined variable with expression
"androidx.compose.foundation.layout.Column"
knthmn
04/05/2021, 1:28 PM
knthmn
04/05/2021, 1:29 PM
You can also look at examples in AndroidLogKotlin to see how live template works