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
190
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
エンジニアとして大切にしている3つのこと
korodroid
0
69
Building for Wear OS “Workshop” - Introduction & Part1-
korodroid
0
28
Building for Wear OS “Workshop” - Preparation (in advance)-
korodroid
0
58
Flutter Lintツールを完全に理解した
korodroid
0
180
Adding App Widget with Flutter - Part 2 (iOS)
korodroid
0
120
[ABC2022Spring]WearOS Recap from I/O 2022 + α
korodroid
0
64
Wear Recap from I/O 2022 + α [short version]
korodroid
0
49
Introduction to Firestore
korodroid
0
23
Firestore開発の効率的な進め方を 完全に理解した
korodroid
1
200
Other Decks in Technology
See All in Technology
OCI DevOps 概要 / OCI DevOps overview
oracle4engineer
PRO
0
470
立ち止まっても、寄り道しても / even if I stop, even if I take a detour
katoaz
0
160
創業1年目のスタートアップでAWSコストを抑えるために取り組んでいること / How to Keep AWS Costs Down at a Startup
yuj1osm
3
1.9k
Red Hatが ひっそりと開発しているOSSデータストア
chiroito
0
110
日経電子版だけじゃない! 日経の新規Webメディアの開発 - NIKKEI Tech Talk #3
sztm
0
140
Raspberry Pi Camera 3 介紹
piepie_tw
PRO
0
120
AKIBA.SaaS資料
yasumuusan
0
160
IoT から見る AWS re:invent 2022 ― AWSのIoTの歴史を添えて/Point of view the AWS re:invent 2022 with IoT - with a history of IoT in AWS
ma2shita
0
220
lt53
98_justdoit
0
110
目指せCoverage100%! AutoScale環境におけるSavings Plans購入戦略 / JAWS-UG_SRE_Coverage
taishin
0
400
Exploring MapStore Release 2022.02: improved 3DTiles support and more
simboss
PRO
0
200
Stripe / Okta Customer Identity Cloud(旧Auth0) の採用に至った理由 〜モリサワの SaaS 戦略〜
tomuro
0
110
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
226
130k
Code Reviewing Like a Champion
maltzj
508
38k
Building Flexible Design Systems
yeseniaperezcruz
314
35k
GraphQLの誤解/rethinking-graphql
sonatard
39
7.8k
How GitHub Uses GitHub to Build GitHub
holman
465
280k
Documentation Writing (for coders)
carmenintech
51
2.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
182
15k
What's in a price? How to price your products and services
michaelherold
233
9.7k
Why Our Code Smells
bkeepers
PRO
326
55k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
15
1.2k
Build your cross-platform service in a week with App Engine
jlugia
221
17k
Designing for humans not robots
tammielis
245
24k
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