Notice
Recent Posts
Recent Comments
Link
250x250
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Dialog
- Flutter
- binding
- viewmodel
- 안드로이드
- Kotlin
- TEST
- 테스트
- 앱바
- LifeCycle
- Navigation
- android
- intent
- 계측
- Compose
- 앱
- data
- tabbar
- textview
- CustomScrollView
- textfield
- Button
- scroll
- ScrollView
- DART
- appbar
- drift
- activity
- Coroutines
- livedata
Archives
- Today
- Total
Study Record
[Android] Compose Appbar 본문
728x90
😶 Compose 간단한 앱바
앱바를 구현하는 간단한 방법은 Scaffod 의 topBar 매개변수를 이용하는 것이다. 간단하게 중앙에 글자만 있는 버전이다.

Scaffold(
topBar = {
TestAppBar()
}
) { it ->
/* */
}
@Composeable
fun TestAppBar() {
CenterAlignedTopAppBar(
title = {
Row(
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = stringResource(id = R.string.app_name),
style = MaterialTheme.typography.displayLarge
)
}
},
modifier = modifier,
)
}
728x90
'안드로이드 > compose' 카테고리의 다른 글
| [Android] Compose ViewModel (0) | 2023.09.13 |
|---|---|
| [Android] Compose 애니메이션 효과 (0) | 2023.09.06 |
| [Android] Compose 테마 (0) | 2023.09.04 |
| [Android] 계측 테스트 - Compose (0) | 2023.08.31 |
| [Android] Compose 기초 - State, MutableState, remember (0) | 2023.08.30 |