Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
[shibuya.apk #13] Android WearのWatch Faceの作り方
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
syarihu
March 24, 2017
Programming
850
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
[shibuya.apk #13] Android WearのWatch Faceの作り方
shibuya.apk #13で発表した「Android WearのWatch Faceの作り方」の資料です。
syarihu
March 24, 2017
More Decks by syarihu
See All by syarihu
[DroidKaigi 2026] Making UI specifications visible: Android UI development in the AI agent era supported by Compose Screenshot Testing and galleries
syarihu
0
770
Recap #io25 What's new in Google Play
syarihu
0
150
[DroidKaigi 2024] Android ViewからJetpack Composeへ 〜Jetpack Compose移行のすゝめ〜 / From Android View to Jetpack Compose: A Guide to Migration
syarihu
4
5.3k
[shibuya.apk #46] Composableの枠を超えてアニメーションする / Animation beyond Composable
syarihu
0
160
[shibuya.apk #41] Jetpack Composeでグリッドに柔軟にスペースを入れたい
syarihu
0
3.6k
[DroidKaigi 2022] 詳解Google Playの新しい定期購入 ~オファーの活用や実装例を添えて~
syarihu
0
4k
5分で分かるGoogle Playの新しいサブスクリプション / Google Play new subscription 2022
syarihu
1
2k
[DroidKaigi 2021] Google Play 定期購入 比例配分モード完全攻略ガイド / Google Play Subscription Proration Mode Complete Guide
syarihu
1
8.2k
[Money Forward Tech Drive] What's new in Google Play [Recap #io21]
syarihu
0
670
Other Decks in Programming
See All in Programming
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
230
mrbgem 三角測量 開発
ogom
0
160
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
3.1k
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
5.5k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
370
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
290
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
270
iOSDC2026登壇資料.pdf
riofujimon
0
200
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
310
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
260
Heart of Swift Concurrency
koher
0
1.1k
Are APIs Still Relevant in the AI Era?
soyuka
0
380
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
290
The SEO identity crisis: Don't let AI make you average
varn
0
570
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Ruling the World: When Life Gets Gamed
codingconduct
0
380
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
58k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
340
Crafting Experiences
bethany
1
360
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
620
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
380
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Transcript
Android Wearの Watch Faceの作り方 shibuya.apk #13 2017/03/24 (Fri.) @syarihu
Taichi Sato (@syarihu) • エンジニア ◦ Androidアプリ ◦ サーバーサイドアプリ (Java)
• GMO Media, inc.
Watch Faceとは • Android Wearでは時計の文字盤の デザインを変更することができる • この文字盤、つまり腕時計の顔の ことをWatch Faceと呼ぶ
Watch Faceを作ってみる • 普通のデジタル時計 • アンビエントモードに変わった時に背景 色が変わるようにする
アンビエントモード • Android Wearの画面をタップしてからし ばらく経つと暗くなる • その暗くなった状態をアンビエントモード と言う ◦ 電池節約してる状態
Watch Faceの作り方
プロジェクトの作成
プロジェクトの作成
プロジェクトの作成
プロジェクトの作成
WatchFaceService の作成
WatchFaceService の作成
WatchFaceService の作成
WatchFaceService の作成
初期化処理
初期化処理
時計の描画
時計の描画
時計の描画
アンビエントモード
アンビエントモード
アンビエントモード
時間が変わったときの処理 • 時間が変わった時には onTimeTick というメソッドが呼ばれる
onTimeTickが呼ばれる条件 • アンビエントモードとインタラクティブ モードで少なくとも1分に1回 • 日付または時刻が変わった時 • タイムゾーンが変わった時
時間が変わった時の処理
AndroidManifest.xml
AndroidManifest.xml
watch_face.xml
デモ
GitHub • syarihu / WatchFaceSample https://github.com/syarihu/WatchFa ceSample
Qiita • Android WearのWatch Faceの作り方 http://qiita.com/syarihu/items/56bfc c247768d892d4fa
自分オリジナルのWatch Faceを 作ってみてください!
ありがとうございました