Note: Live-template variable $VAR_NAME$
is a placeholder within a live template that enables you to dynamically
inserts values when expanding the template.
Shortcut | Code |
---|---|
box |
Box($MODIFIER$) { } |
column |
Column($MODIFIER$) { } |
row |
Row($MODIFIER$) { } |
txt |
Text(text = $TEXT$) { } |
scf |
Scaffold { innerPadding -> } |
scfTopbar |
Scaffold(topBar = { $TOP_BAR$ } ) { innerPadding -> } |
hspacer |
Spacer(modifier = Modifier.width($PADDING$)) |
vspacer |
Spacer(modifier = Modifier.height($PADDING$)) |
mv |
modifier = Modifier. |
mp |
modifier: Modifier = Modifier |
sr |
stringResource(id = R.string.$RESOURCE_ID$) |
pr |
painterResource(id = R.drawable.$RESOURCE_ID$) |
rmfs |
remember { mutableFloatStateOf($INITIAL_VALUE$) } |
rmis |
remember { mutableIntStateOf($INITIAL_VALUE$) } |
rms |
remember { mutableStateOf($INITIAL_VALUE$) } |
le |
LaunchedEffect($KEY$ (default Unit)) { } |
le2 |
LaunchedEffect($KEY1$, $KEY2$)) { } |
de |
DisposableEffect($KEY$) { onDispose {} } |
de2 |
DisposableEffect($KEY1$, $KEY2$) { onDispose {} } |
statehoisting |
$VALUE_NAME$: $TYPE$, on$CAPETLIZED_VALUE_NAME$Change: ($TYPE$) -> Unit, |
slot |
$NAME$: @Composable () -> Unit, |
mc |
MaterialTheme.colorScheme.$COLOR$ |
ms |
MaterialTheme.shapes.$SHAPE$ |
mt |
MaterialTheme.typography.$TYPOGRAPHY$ |
rcs |
val coroutineScope = rememberCoroutineScope() |
rlc |
val context = LocalContext.current |
rld |
val density = LocalDensity.current |
- Copy all the live-templates from this gist
- Create a new live-template group by going to Settings -> Editor -> Live templates -> + Template Group
- Right-click on the Template group then click past or just
CTRL + V/ CMD + V
- Done ✅
... coming soon...