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
Bottom navigation
Search
Takuji Nishibayashi
October 26, 2016
Technology
0
180
Bottom navigation
Takuji Nishibayashi
October 26, 2016
Tweet
Share
More Decks by Takuji Nishibayashi
See All by Takuji Nishibayashi
CameraX使ってみた
takuji31
0
130
kotlinx.datetime 使ってみた
takuji31
0
470
HiltのCustom Componentについて
takuji31
0
230
java.timeをAndroidで使う
takuji31
0
91
KSPを使ってコード生成
takuji31
0
340
Kotlin Symbol Processing API (KSP) を使って Kotlin ア プリケーションの開発を効率化する
takuji31
1
1.1k
kotlinx.serialization
takuji31
0
570
kanmoba-returns-02.pdf
takuji31
0
200
AndroidXとKotlin Coroutines
takuji31
0
350
Other Decks in Technology
See All in Technology
Iceberg Meetup Japan #1 : Iceberg and Databricks
databricksjapan
0
370
AIエージェント入門
minorun365
PRO
31
18k
サイト信頼性エンジニアリングとAmazon Web Services / SRE and AWS
ymotongpoo
7
1.6k
いまからでも遅くない!コンテナでWebアプリを動かしてみよう!コンテナハンズオン編
nomu
0
150
データエンジニアリング領域におけるDuckDBのユースケース
chanyou0311
9
2.2k
日経のデータベース事業とElasticsearch
hinatades
PRO
0
240
AWSを活用したIoTにおけるセキュリティ対策のご紹介
kwskyk
0
350
OPENLOGI Company Profile
hr01
0
60k
クラウド関連のインシデントケースを収集して見えてきたもの
lhazy
8
1.2k
依存パッケージの更新はコツコツが勝つコツ! / phpcon_nagoya2025
blue_goheimochi
3
220
Охота на косуль у древних
ashapiro
0
110
ExaDB-XSで利用されているExadata Exascaleについて
oracle4engineer
PRO
3
260
Featured
See All Featured
Embracing the Ebb and Flow
colly
84
4.6k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Become a Pro
speakerdeck
PRO
26
5.2k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Why Our Code Smells
bkeepers
PRO
336
57k
Transcript
Bottom navigation @takuji31
@takuji31 (Takuji Nishibayashi) Application Engineer at Hatena
Loves ! (AVG 170 ~ 175)
Loves Kotlin
Kansai.kt #2 Γ·͢
11݄26() 14:30ʙ ͯͳژΦϑΟε
࠷ۙPerlͱ Markdownॻ͍ͯ·͢
AGENDA • Bottom navigation • BottomNavigationViewΛͬͯΈΔ
Bottom navigation
Material Designίϯϙ ʔωϯτͷҰͭ
Bottom navigation bars make it easy to explore and switch
between top- level views in a single tap. — https://material.google.com/components/bottom- navigation.html
Botton navigation • 3ʙ5ͭͷτοϓϨϕϧͷViewΓସ͑ΛγϯάϧλοϓͰߦ ͏ͨΊͷComponent • 3ʙ5ݸҎ֎ͷ࣌ɺτοϓϨϕϧҎ֎ͷ࣌ʹ͏͖Ͱͳ ͍ • Bottom͕ͩɺେ͖ͳը໘ͷ࣌ࠨʹදࣔ͢Δ
None
iOSͷTabBarΈ͍ͨͳ ͭ
͋ΔಥવΨΠυϥΠϯ ʹग़ݱ
ͪΖΜ࣮ͳ͍
!
2016/10/19
Android 7.1 Developer Preview
Support Library 25.0.0
None
αϥͬͱՃ͞Ε͍ͯͨ
Bottom Navigation View ΛͬͯΈΔ
build.gradle dependencies { compile 'com.android.support:design:25.0.0' }
layout.xml <RelativeLayout> <android.support.design.widget.BottomNavigationView app:menu="@menu/bottom_navigation" android:layout_width="match_parent" android:layout_height="wrap_content" /> </RelativeLayout>
menu.xml <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/menu_home" android:icon="@drawable/ic_home_black_24dp" android:title="Home"/> <item android:id="@+id/menu_notifications" android:icon="@drawable/ic_notifications_black_24dp"
android:title="Notifications"/> <item android:id="@+id/menu_profile" android:icon="@drawable/ic_person_black_24dp" android:title="Profile"/> </menu>
Activity override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_bottom_navigation_view) bottomNavigationView.setOnNavigationItemSelectedListener {
textView.text = "This is " + it.title.toString() true } }
None
ͬͯΈͯ • menuͷxmlॻ͚ͩ͘ͰͦΕͬΆ͍ͷ͕Ͱ͖͕͋Δ • ΞΠίϯToolbarͳΜ͔ͱಉ͡Α͏ʹtinting͞ΕΔ • ΠϕϯτOnNavigationItemSelectedListenerΛઃఆͯͦ͠ ͜ͰͳΜ͔Δ
ͬͯΈͯ • 5݅·Ͱ͔͠ஔ͚ͳ͍ɺͦΕҎ্ஔ͍ͨΒྫ֎ • 3݅ͱͦΕҎ্Ͱϝχϡʔࣗମͷݟ͕ͨҧ͏ • 3݅ͷ࣌ςΩετ͖Ͱִؒදࣔ • 4݅Ҏ্ͷ࣌ඇΞΫςΟϒͳͷςΩετඇදࣔɺબ͞Εͨͷ͕͕ ͬͯදࣔ
• Γସ͑࣌ʹΞχϝʔγϣϯ͢ΔΜ͚ͩͲɺͳΜ͔ҧ͏ • API25·ͩPreviewͳͷͰ͏ͱຊମͷιʔείʔυ͕ݟ͑ͳ͍! • ͓ͯͨΜͱ͕ͪ͏ʂ
takuji31/ KanmobaAndroid
enjoy navigation life !