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
BottomBarAndSnackBar
Search
funnelbit
December 26, 2016
Technology
0
460
BottomBarAndSnackBar
funnelbit
December 26, 2016
Tweet
Share
More Decks by funnelbit
See All by funnelbit
Hatena Engineer Seminar #9
funnelbit
5
7.2k
droidkaigi-2017-renovation
funnelbit
10
10k
Dart
funnelbit
0
250
Dagger2 Optional bindings
funnelbit
0
530
WearableRecyclerView
funnelbit
1
770
QucikSettingsTileAPI
funnelbit
0
340
Mobile Vision
funnelbit
0
430
AwarenessAPI
funnelbit
0
130
Asynchronous Injection
funnelbit
1
230
Other Decks in Technology
See All in Technology
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
5
560
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
110
SSMRunbook作成の勘所_20241120
koichiotomo
2
120
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
220
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
300
Terraform Stacks入門 #HashiTalks
msato
0
350
[FOSS4G 2019 Niigata] AIによる効率的危険斜面抽出システムの開発について
nssv
0
310
地理情報データをデータベースに格納しよう~ GPUを活用した爆速データベース PG-Stromの紹介 ~
sakaik
1
150
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
0
110
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
370
フルカイテン株式会社 採用資料
fullkaiten
0
40k
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Six Lessons from altMBA
skipperchong
27
3.5k
Documentation Writing (for coders)
carmenintech
65
4.4k
We Have a Design System, Now What?
morganepeng
50
7.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
KATA
mclloyd
29
14k
Transcript
#PUUPN#BS ͱ 4OBDL#BS
ࣗݾհ ଜྋ גࣜձࣾͯͳ )BUFOBGVOOFMCJU 5XJUUFS!FYQFSPQFSP
%SPJE,BJHJͰൃද͠·͢ w λΠτϧʮେنΞϓϦͷϦϊϕʔγϣϯʯ w ͓ٓ͘͠ئ͍͠·͢"
4OBDL#BSͱ#PUUPN#BS ͷΈ߹Θͤʹ͍ͭͯ
"DUJWJUZ 'SBHNFOU Ͱ'SBHNFOU͔Β 4OBDL#BSΛͩ͢
"DUJWJUZ 'SBHNFOU 4OBDL#BS
"DUJWJUZ 'SBHNFOU 4OBDL#BS Snackbar.make(v, "SnackBar!!", Snackbar.LENGTH_LONG).show(); w 'SBHNFOUͰݺͿ
None
"DUJWJUZ #PUUPN#BS 'SBHNFOUͰ'SBHNFOU͔ Β4OBDL#BSΛͩ͢
"DUJWJUZ #PUUPN#BS 'SBHNFOU 4OBDL#BS
None
"DUJWJUZ #PUUPN#BS 'SBHNFOU 4OBDL#BS w 4OBDL#BSදࣔ͢Δ࣌ɺ7JFXΛḷͬͯద ͳ7JFX(SPVQʹදࣔ͞ΕΔ
"DUJWJUZ #PUUPN#BS 'SBHNFOU 4OBDL#BS w 3FMBUJWF-BZPVU w "QQCBS
w $PPSEJOBUPS-BZPVU w 'SBHNFOU w $PPSEJOBUPS-BZPVU w 5PPMCBS w 3FMBUJWF-BZPVU w "DUJWJUZͷϨΠΞτΛॻ͖͑Δ
None
"DUJWJUZ ಈ͘"QQ#BSͱ #PUUPN#BS 'SBHNFOUͰ 'SBHNFOU͔Β4OBDL#BSΛͩ͢
None
"DUJWJUZͷ#FIBWJPSͰͳΜ ͱ͔͢Δʁ if (dependency instanceof Snackbar.SnackbarLayout) { int targetPadding =
Math.max(0, bottomBar.getMeasuredHeight() - (int) (bottomBar.getY() - bottomBar.getTop())); dependency.setPadding(dependency.getPaddingLeft(), dependency.getPaddingTop(), dependency.getPaddingRight(), targetPadding); } w #PUUPN#BSͷ#FIBWJPSͱͯ͜͠ΜͳͷΛॻ͘
None
w 4OBL#BSʹ&MFWBUJPO͕͋Δ EQ w IUUQTNBUFSJBMJPHVJEFMJOFTDPNQPOFOUT CPUUPNOBWJHBUJPOIUNMCPUUPNOBWJHBUJPO TQFDT
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_behavior="com.example.funnelbit.snackbarapp.BottomBarB ehavior" android:layout_gravity="bottom" android:elevation="8dp"
ݹ͍όʔδϣϯΛߟྀ // ͠ KITKAT ҎԼͰ͋Δ߹ɺelevation ͕͑ͳ͍ͨΊɺbottomBar ͷ্ʹ Snackbar ͕ඃͬͯ͞͠·͏ɻ //
ͦ͜Ͱ bringToFront() Λ͍ɺॏͶॱΛม͑Δɻ if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) { bottomBar.bringToFront(); // KITKAT ΑΓલͷόʔδϣϯͷ߹ɺrequestLayout() ͱ invalidate() Λݺͳ͚Ε ॏͶॱͷมߋ͕ͳ͞Εͳ͍ɻ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { bottomBar.getParent().requestLayout(); ((View) bottomBar.getParent()).invalidate(); } } return true; w #PUUPN#BSͷ#FIBWJPSͱͯ͜͠ΜͳͷΛॻ͘ʢଓ͖ʣ
None
None
w Ͱಈ͔͢ͱͪΐͬͱ͓͔͘͠ͳΔ
*OUFSGBDF public interface ErrorMessageInterface { void show(String text); }
'SBHNFOU ((ErrorMessageInterface) getActivity()).show("SnackBar!!");
"DUJWJUZ Snackbar.make(findViewById(R.id.snackbar_container), "SnackBar!!", Snackbar.LENGTH_LONG).show();
-BZPVU "DUJWJUZ w $PPSEJOBUPS-BZPVU w "QQ#BS w 'SBHNFOU w #PUUPN#BS$POUBJOFS
w $PPSEJOBUPS-BZPVU w #PUUPN#BS$POUFOU w $PPSEJOBUPS-BZPVU
None
·ͱΊ w ৭ʑํ๏͕͋Γͦ͏͕ͩʜ w ݁ہ"DUJWJUZʹΤϥʔදࣔΛͤΔͷ͕Α͍ w 'SBHNFOU͕Կͳͷ͔Δ༝ͳ͍ͷͰ w ࡦ͕͋Εڭ͍͑ͯͩ͘͞
͋Γ͕ͱ͏͍͟͝·ͨ͠