Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
BottomAppBarの話
Search
star_zero
March 20, 2018
Technology
360
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
BottomAppBarの話
shibuya.apk #23
star_zero
March 20, 2018
More Decks by star_zero
See All by star_zero
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
1.6k
Jetpack Compose の Side-effect を使いこなす / DroidKaigi 2023
star_zero
5
7.1k
Android 14 新機能 / Android 14 Meetup Nagoya
star_zero
1
680
Android 14 と Predictive back gesture / Shibuya.apk #42
star_zero
0
480
Coroutines Test 入門 / Android Test Night #8
star_zero
2
1.3k
What's new in Jetpack / I/O Extended Japan 2022
star_zero
1
710
Kotlin 2021 Recap / DevFest 2021
star_zero
3
1.4k
Kotlin Symbol Processing (KSP) を使ったコード生成 / DroidKaigi 2021
star_zero
2
5.3k
What's new Android 12
star_zero
0
620
Other Decks in Technology
See All in Technology
ChatworkとBPaaS 異なる特性で学んだAI機能開発の ベストプラクティス
kubell_hr
2
3.1k
AI Testing Talks: Challenges of Applying AI in Software Testing: From Hype to Practical Use
exactpro
PRO
1
140
Socrates × Looker 〜セマンティックレイヤーで進化するデータ分析エージェント〜
hanon52_
1
530
新しいVibe Codingと”自走”について
watany
5
120
新アーキテクチャ「TiDB X」解説とDedicated比較 TiDB Cloud Premiumのゲーム運用活用を検証
staffrecruiter
0
120
Oracle Cloud Infrastructure IaaS 新機能アップデート 2026/3 - 2026/5
oracle4engineer
PRO
1
220
PHP と TypeScript の型システム比較:AI 時代の「型」は誰のためにあるのか? #frontend_phpcon_do / frontend_phpcon_do_2026
shogogg
1
260
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development
yoshidashingo
1
380
中期計画、2回作ってみた ~業務委託と正社員、両方の視点から~
demaecan
0
140
Djangoユーザが知っ得なPostgreSQL機能 - 設計の選択肢を増やす / Djang-use-PostgreSQL
soudai
PRO
0
210
Agentic Defenseとともにセキュリティエンジニアが輝き続けるには / How Security Engineers Can Keep Excelling with Agentic Defense
yuj1osm
0
130
AgentGatewayを試してみたかった
tkikuchi
0
120
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
330
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
400
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
4 Signs Your Business is Dying
shpigford
187
22k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.6k
A Tale of Four Properties
chriscoyier
163
24k
HDC tutorial
michielstock
2
690
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Transcript
BottomAppBarの話 shibuya.apk #23 2018/03/20 @STAR_ZERO
Support Library 28.0.0 Alpha1
Support Library 28.0.0 Alpha1
Material Design Components for iOS https://material.io/components/ios/catalog/
None
基本的な使い方
build.gradle apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions'
android { compileSdkVersion 'android-P' // ... } dependencies { // ... implementation 'com.android.support:appcompat-v7:28.0.0-alpha1' implementation 'com.android.support:design:28.0.0-alpha1' }
Layout XML <android.support.design.widget.CoordinatorLayout> <android.support.design.widget.AppBarLayout> <android.support.v7.widget.Toolbar /> </android.support.design.widget.AppBarLayout> <include layout="@layout/content_main" />
<android.support.design.bottomappbar.BottomAppBar android:id="@+id/bottomappbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:layout_gravity="bottom" app:backgroundTint="@color/colorPrimary" app:layout_dodgeInsetEdges="bottom" app:popupTheme="@style/AppTheme.PopupOverlay" /> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" app:layout_anchor="@id/bottomappbar" app:srcCompat="@drawable/ic_add" /> </android.support.design.widget.CoordinatorLayout>
Layout XML <android.support.design.bottomappbar.BottomAppBar android:id="@+id/bottomappbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:layout_gravity="bottom" app:backgroundTint="@color/colorPrimary" app:layout_dodgeInsetEdges="bottom" app:popupTheme="@style/AppTheme.PopupOverlay"
/>
Layout XML <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" app:layout_anchor="@id/bottomappbar" app:srcCompat="@drawable/ic_add" />
カスタマイズ
FABの表示位置変更 app:fabAlignmentMode="end"
メニューを表示 bottomappbar.replaceMenu(R.menu.menu_bottom) Center End
くぼみの距離(深さ) 0dp (default) 20dp app:fabCradleVerticalOffset="20dp"
くぼみの直径 64dp (default) 92dp app:fabCradleDiameter="92dp"
くぼみの角の丸み 12dp 8dp (default) app:fabCradleRoundedCornerRadius="12dp" 0dp
アニメーション
くっついたり離れたり // くっつく bottomappbar.isFabAttached = true // 離れる bottomappbar.isFabAttached =
false
真ん中いったり右にいったり // 真ん中 bottomappbar.fabAlignmentMode = BottomAppBar.FAB_ALIGNMENT_MODE_CENTER // 右 bottomappbar.fabAlignmentMode =
BottomAppBar.FAB_ALIGNMENT_MODE_END
おわり