Slide 1

Slide 1 text

#PUUPN#BS ͱ 4OBDL#BS

Slide 2

Slide 2 text

ࣗݾ঺հ ๺ଜྋ גࣜձࣾ͸ͯͳ )BUFOBGVOOFMCJU 5XJUUFS!FYQFSPQFSP

Slide 3

Slide 3 text

%SPJE,BJHJͰൃද͠·͢ w λΠτϧʮେن໛ΞϓϦͷϦϊϕʔγϣϯʯ w ͓ٓ͘͠ئ͍͠·͢"

Slide 4

Slide 4 text

4OBDL#BSͱ#PUUPN#BS ͷ૊Έ߹Θͤʹ͍ͭͯ

Slide 5

Slide 5 text

"DUJWJUZ'SBHNFOU Ͱ'SBHNFOU͔Β 4OBDL#BSΛͩ͢

Slide 6

Slide 6 text

"DUJWJUZ'SBHNFOU 4OBDL#BS

Slide 7

Slide 7 text

"DUJWJUZ'SBHNFOU 4OBDL#BS Snackbar.make(v, "SnackBar!!", Snackbar.LENGTH_LONG).show(); w 'SBHNFOUͰݺͿ

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

"DUJWJUZ #PUUPN#BS 'SBHNFOUͰ'SBHNFOU͔ Β4OBDL#BSΛͩ͢

Slide 10

Slide 10 text

"DUJWJUZ #PUUPN#BS 'SBHNFOU4OBDL#BS

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

"DUJWJUZ #PUUPN#BS 'SBHNFOU4OBDL#BS w 4OBDL#BS͸දࣔ͢Δ࣌ɺ਌7JFXΛḷͬͯద ੾ͳ਌7JFX(SPVQ಺ʹදࣔ͞ΕΔ

Slide 13

Slide 13 text

"DUJWJUZ #PUUPN#BS 'SBHNFOU4OBDL#BS w 3FMBUJWF-BZPVU w "QQCBS w $PPSEJOBUPS-BZPVU w 'SBHNFOU w $PPSEJOBUPS-BZPVU w 5PPMCBS w 3FMBUJWF-BZPVU w "DUJWJUZͷϨΠΞ΢τΛॻ͖׵͑Δ

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

"DUJWJUZ ಈ͘"QQ#BSͱ #PUUPN#BS 'SBHNFOUͰ 'SBHNFOU͔Β4OBDL#BSΛͩ͢

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

"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ͱͯ͜͠ΜͳͷΛॻ͘

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

w 4OBL#BSʹ͸&MFWBUJPO͕͋Δ EQ w IUUQTNBUFSJBMJPHVJEFMJOFTDPNQPOFOUT CPUUPNOBWJHBUJPOIUNMCPUUPNOBWJHBUJPO TQFDT

Slide 20

Slide 20 text

Slide 21

Slide 21 text

ݹ͍όʔδϣϯΛߟྀ // ΋͠΋ 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ͱͯ͜͠ΜͳͷΛॻ͘ʢଓ͖ʣ

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

w ௒଎Ͱಈ͔͢ͱͪΐͬͱ͓͔͘͠ͳΔ

Slide 25

Slide 25 text

*OUFSGBDF public interface ErrorMessageInterface {
 void show(String text);
 }

Slide 26

Slide 26 text

'SBHNFOU ((ErrorMessageInterface) getActivity()).show("SnackBar!!");

Slide 27

Slide 27 text

"DUJWJUZ Snackbar.make(findViewById(R.id.snackbar_container), "SnackBar!!", Snackbar.LENGTH_LONG).show();

Slide 28

Slide 28 text

-BZPVU "DUJWJUZ w $PPSEJOBUPS-BZPVU w "QQ#BS w 'SBHNFOU w #PUUPN#BS$POUBJOFS w $PPSEJOBUPS-BZPVU w #PUUPN#BS$POUFOU w $PPSEJOBUPS-BZPVU

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

·ͱΊ w ৭ʑํ๏͕͋Γͦ͏͕ͩʜ w ݁ہ"DUJWJUZʹΤϥʔදࣔΛ೚ͤΔͷ͕Α͍ w 'SBHNFOU͸਌͕Կͳͷ͔஌Δ༝΋ͳ͍ͷͰ w ࡦ͕͋Ε͹ڭ͍͑ͯͩ͘͞

Slide 31

Slide 31 text

͋Γ͕ͱ͏͍͟͝·ͨ͠