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.1k
droidkaigi-2017-renovation
funnelbit
10
10k
Dart
funnelbit
0
250
Dagger2 Optional bindings
funnelbit
0
530
WearableRecyclerView
funnelbit
1
760
QucikSettingsTileAPI
funnelbit
0
340
Mobile Vision
funnelbit
0
430
AwarenessAPI
funnelbit
0
130
Asynchronous Injection
funnelbit
1
220
Other Decks in Technology
See All in Technology
ガバメントクラウド単独利用方式におけるIaC活用
techniczna
3
270
[JAWS-UG金沢支部×コンテナ支部合同企画]コンテナとは何か
furuton
3
250
よくわからんサービスについての問い合わせが来たときの強い味方 Amazon Q について
kazzpapa3
0
220
いまならこう作りたい AWSコンテナ[本格]入門ハンズオン 〜2024年版 ハンズオンの構想〜
horsewin
9
2.1k
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.6k
LeSSに潜む「隠れWF病」とその処方箋
lycorptech_jp
PRO
2
120
Forget efficiency – Become more productive without the stress
ufried
0
140
話題のGraphRAG、その可能性と課題を理解する
hide212131
4
1.5k
分布で見る効果検証入門 / ai-distributional-effect
cyberagentdevelopers
PRO
4
700
「最高のチューニング」をしないために / hack@delta 24.10
fujiwara3
21
3.4k
신뢰할 수 있는 AI 검색 엔진을 만들기 위한 Liner의 여정
huffon
0
340
AWS re:Inventを徹底的に楽しむためのTips / Tips for thoroughly enjoying AWS re:Invent
yuj1osm
1
570
Featured
See All Featured
KATA
mclloyd
29
13k
The Art of Programming - Codeland 2020
erikaheidi
51
13k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Navigating Team Friction
lara
183
14k
Into the Great Unknown - MozCon
thekraken
31
1.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Writing Fast Ruby
sferik
626
61k
Bash Introduction
62gerente
608
210k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
3
370
Ruby is Unlike a Banana
tanoku
96
11k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Rails Girls Zürich Keynote
gr2m
93
13k
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 ࡦ͕͋Εڭ͍͑ͯͩ͘͞
͋Γ͕ͱ͏͍͟͝·ͨ͠