Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Wear OSアプリ開発Tips with Jetpack Compose
Kenichi Kambara
June 14, 2022
Technology
0
96
Wear OSアプリ開発Tips with Jetpack Compose
Engineer LT 1の発表資料です。
#EngineerLT
#WearOS
#androidjo
Kenichi Kambara
June 14, 2022
Tweet
Share
More Decks by Kenichi Kambara
See All by Kenichi Kambara
Adding App Widget with Flutter - Part 2 (iOS)
korodroid
0
71
[ABC2022Spring]WearOS Recap from I/O 2022 + α
korodroid
0
31
Wear Recap from I/O 2022 + α [short version]
korodroid
0
32
Introduction to Firestore
korodroid
0
11
Firestore開発の効率的な進め方を 完全に理解した
korodroid
1
170
[Android個人開発LT]個人開発の振り返り&得られたこと
korodroid
1
100
海外活動を通じて得た英語の学び方
korodroid
0
330
Flutter State management with GetX
korodroid
0
110
[ABCD2021Winter]Flutterアプリ開発実践
korodroid
2
110
Other Decks in Technology
See All in Technology
Power Automate for desktopで 配信環境を改善してみた話
akiika
0
270
IBM Cloud Festa Online 2022 Summer
1ftseabass
PRO
0
200
テクニカルライティングの検定を受けてみた話 / "My Story About Taking the Technical Writing Exam
line_developers
PRO
1
210
フィンテック養成勉強会#24
finengine
0
330
年700万円損するサーバレスの 認可システムをご紹介します!!
higuuu
3
330
私のAWS愛を聞け!ここが好きだよAmazon FSx for NetApp ONTAP
non97
0
750
Trusted Web プロトタイプ
finengine
0
320
ロボットの実行すらメンドクサイ!?
kou12092
0
170
Learning to Solve Hard Minimal Problems
takmin
1
320
ソフトバンクでのMECの取り組みについて
sbtechnight
0
310
経験者が話す!クラウド接続の3つの注意点と最新情報
sbtechnight
0
310
〇〇みたいな検索作ってと言われたときに考えること / thinking before developing search system like that one
ryook
5
2.7k
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
39
13k
Art, The Web, and Tiny UX
lynnandtonic
280
18k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
29
4.4k
BBQ
matthewcrist
74
7.9k
We Have a Design System, Now What?
morganepeng
35
3k
The Power of CSS Pseudo Elements
geoffreycrofte
47
4k
A designer walks into a library…
pauljervisheath
196
16k
The Illustrated Children's Guide to Kubernetes
chrisshort
18
40k
Designing with Data
zakiwarfel
91
4k
For a Future-Friendly Web
brad_frost
166
7.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
344
17k
Building Adaptive Systems
keathley
25
1.2k
Transcript
Wear OSΞϓϦ։ൃTips with Jetpack Compose 2022.06.14 ਆݪ ݈Ұ (@korodroid) Engineer
LT #1
2 About me ਆݪ ݈Ұ (@korodroid) •Mobile App Development •Speeches
(e.g. 9 International confs.) •Writings (e.g. 6 Dev Books) •[Of fi cial] Evangelist at NTT TechnoCross •[Private] iplatform.org
Agenda •Wear OS ͷ࠷৽τϐοΫ(։ൃऀ͚) •Wear OS ΞϓϦ։ൃTips with Jetpack Compose
Source: Google I/O 2022 Keynote / Developer Keynote / Wear OS Session Android Developers Blog
Wear OS Topics from I/O 2022 (։ൃऀ͚:ൈਮ)
Compose for Wear OS Input components Dialogs Page Indicator Progress
Indicator Navigation
Compose for Wear OS ࣮ྫ(͋ͱͰվળ͍͖ͯ͠·͢) @Composable fun ContactsScreenV1() { LazyColumn
{ item { ListHeader { Text(text = "Contacts") } } items(20) { Chip( icon = { Icon( Icons.Rounded.Face, contentDescription = "Contacts", ) }, label = { Text("HogeHoge Tarou $it") }, colors = ChipDefaults.primaryChipColors(), onClick = { }, ) } } }
7 Wear OS ΞϓϦ։ൃTips with Jetpack Compose
8 ։ൃڥ IntelʹՃ͑ɺApple Siliconαϙʔτ Wear OS ։ൃʹ͓͢͢Ί
9 Wear OS ϓϩδΣΫτ࡞ Jetpack ComposeͰ։ൃ͢Δ߹
10 Live Demo💪
Tips1: Live Editͷઃఆ(Electric Eel)
Tips2: ϓϨϏϡʔػೳ(Electric Eel)
[UIվળͷલʹ…]Wear OSͱMobileͷҧ͍(ྫ) Wear OS (androidx.wear.*) Mobile (androidx.*)
androidx.wear.compose:compose-material androidx.wear.compose:compose-navigation androidx.compose.foundation:foundation androidx.wear.compose:compose-foundation androidx.compose.material:material androidx.navigation:navigation-compose androidx.compose.foundation:foundation ref: https://developer.android.com/training/wearables/compose
@Composable fun ContactsScreenV2() { ScalingLazyColumn { item { ListHeader {
Text(text = "Contacts") } } items(20) { Chip( icon = { Icon( Icons.Rounded.Face, contentDescription = "Contacts", ) }, label = { Text("HogeHoge Tarou $it") }, colors = ChipDefaults.primaryChipColors(), onClick = { }, ) } } } Tips3: UIվળྫ1(ScalingLazyColumnͷஔ͖͑)
@OptIn(ExperimentalWearMaterialApi::class) @Composable fun ContactsScreenV3() { val listState = rememberScalingLazyListState() Scaffold(
timeText = { if (!listState.isScrollInProgress) { TimeText() } }, vignette = { Vignette( vignettePosition = VignettePosition.TopAndBottom ) }, positionIndicator = { PositionIndicator( scalingLazyListState = listState, ) } ) { ScalingLazyColumn(state = listState) { // লུ } } Tips4: UIվળྫ2(Scaffoldͷ׆༻)
Reference •Google I/O 2022 Keynote / Developer Keynote /
Session https://io.google/2022 •Announcing Compose for Wear OS Beta! https://android-developers.googleblog.com/2022/05/ announcing-compose-for-wear-os-beta.html •Codelabs (Wear OS) https://codelabs.developers.google.com/?cat=wearos
Please let me know if you have any requests
such as technical speeches, technical writings and so on. http://www.linkedin.com/in/korodroid Thank you so much http://fb.com/kanbara.kenichi @korodroid