본문 바로가기

Android24

JETPACK COMPOSE: Column에 대해 알아보자 Column Coposable은 수직으로 배열된 형식으로 Composable collection을 표시하는 기능을 제공합니다. 여기서 Composable은 동시에 하나씩 차례로 표시됩니다. Column을 선언할 때 생성자(constructor)가 취할 수 있는네 가지 인수(argument)가 있습니다. @Composable inline fun Column( modifier: Modifier = Modifier, verticalArrangement: Arrangement.Vertical = Arrangement.Top, horizontalAlignment: Alignment.Horizontal = Alignment.Start, children: @Composable ColumnScope.() -> Unit.. 2022. 1. 13.
JETPACK COMPOSE: Box에 대해 알아보자 A Simple Box Layout Example 여기 MainActivity.kt에서 BoxExample0라는 composable function을 만들었습니다. 그리고 거기에 간단한 Box를 추가했습니다. 그런 다음 onCreate()의 setContect 블록에서 해당 함수를 호출했습니다. class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { BoxExample0() } } } @Composable fun BoxExample0() { Box( modifier = Modifier .background.. 2022. 1. 11.
JETPACK COMPOSE: CARD에 대해 알아보자 The Card composable is a surface that can be used to present content and actions focused on a single topic. Card를 display하는데 사용할 수 있는 single composable function이 아래와 같이 있습니다. @Composable fun Card( modifier: Modifier = Modifier, shape: Shape = MaterialTheme.shapes.medium, backgroundColor: Color = MaterialTheme.colors.surface, contentColor: Color = contentColorFor(backgroundColor), border: BorderS.. 2022. 1. 11.
Android studio 기본 예제로 알아보는 Jetpack Compose의 기초 What's Jetpack? A library of tools to help developers build modern Android apps following the best practices Jetpack Libraries Types The library is vast, but the main types are : Graphics, UI, Navigation, Media, Lifecycle, Data, Security, Data, Performance/Test Jetpack Compose Android's modern toolkit for building native UI(User interfaces) Less code, Accelerated Development, Powerful tools, Kot.. 2022. 1. 11.
300x250