From 405b3da398b042d450dc2e3e542eadd0a20a9b0e Mon Sep 17 00:00:00 2001 From: Yuichi Araki Date: Thu, 19 Feb 2015 18:07:51 +0900 Subject: [PATCH] Add NavigationView usage to SupportDesignDemos Change-Id: Ia9a4070dcae554970f0205a575d218fcb190f226 --- .../SupportDesignDemos/AndroidManifest.xml | 9 ++ .../ic_action_navigation_menu.png | Bin 0 -> 278 bytes .../res/drawable-hdpi/ic_android.png | Bin 0 -> 358 bytes .../ic_action_navigation_menu.png | Bin 0 -> 137 bytes .../res/drawable-mdpi/ic_android.png | Bin 0 -> 226 bytes .../ic_action_navigation_menu.png | Bin 0 -> 273 bytes .../res/drawable-xhdpi/ic_android.png | Bin 0 -> 367 bytes .../ic_action_navigation_menu.png | Bin 0 -> 550 bytes .../res/drawable-xxhdpi/ic_android.png | Bin 0 -> 557 bytes .../res/drawable-xxxhdpi/ic_android.png | Bin 0 -> 687 bytes .../res/layout/design_navigation.xml | 55 ++++++++ .../res/layout/design_navigation_header.xml | 26 ++++ .../res/menu/navigation.xml | 71 ++++++++++ .../res/values-v21/styles.xml | 25 ++++ .../SupportDesignDemos/res/values/strings.xml | 17 +++ .../SupportDesignDemos/res/values/styles.xml | 13 ++ .../design/widget/NavigationViewUsage.java | 132 ++++++++++++++++++ 17 files changed, 348 insertions(+) create mode 100644 samples/SupportDesignDemos/res/drawable-hdpi/ic_action_navigation_menu.png create mode 100644 samples/SupportDesignDemos/res/drawable-hdpi/ic_android.png create mode 100644 samples/SupportDesignDemos/res/drawable-mdpi/ic_action_navigation_menu.png create mode 100644 samples/SupportDesignDemos/res/drawable-mdpi/ic_android.png create mode 100644 samples/SupportDesignDemos/res/drawable-xhdpi/ic_action_navigation_menu.png create mode 100644 samples/SupportDesignDemos/res/drawable-xhdpi/ic_android.png create mode 100644 samples/SupportDesignDemos/res/drawable-xxhdpi/ic_action_navigation_menu.png create mode 100644 samples/SupportDesignDemos/res/drawable-xxhdpi/ic_android.png create mode 100644 samples/SupportDesignDemos/res/drawable-xxxhdpi/ic_android.png create mode 100644 samples/SupportDesignDemos/res/layout/design_navigation.xml create mode 100644 samples/SupportDesignDemos/res/layout/design_navigation_header.xml create mode 100644 samples/SupportDesignDemos/res/menu/navigation.xml create mode 100644 samples/SupportDesignDemos/res/values-v21/styles.xml create mode 100644 samples/SupportDesignDemos/src/com/example/android/support/design/widget/NavigationViewUsage.java diff --git a/samples/SupportDesignDemos/AndroidManifest.xml b/samples/SupportDesignDemos/AndroidManifest.xml index f998dccc3..8fcdf3827 100644 --- a/samples/SupportDesignDemos/AndroidManifest.xml +++ b/samples/SupportDesignDemos/AndroidManifest.xml @@ -45,6 +45,15 @@ + + + + + + + diff --git a/samples/SupportDesignDemos/res/drawable-hdpi/ic_action_navigation_menu.png b/samples/SupportDesignDemos/res/drawable-hdpi/ic_action_navigation_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..743fd7dadad4e0e487ac3e100b14fd40703e8c0d GIT binary patch literal 278 zcmV+x0qOpUP)+dV z0T!T1LtqE0>J|}qY4!if-kJG9YB2-&9YBcwH2Q0F`xPSSjY{D&FxnMS%mWaxPLaY6 z_;;G)f66tw_d~`3oKwSRV6G*uk_X^;>D6{X&y>q(2RL4OwH?qiKF$0R7yEF@J6&9)17;lKbdFei%=us!M~4fNqH}gi=94MgcF3{M zoEfi3rL1HMa2aTWXC%@i>&rlGUJ&9v(XvBV$S+}qw#bnpkE;O=Uw-Fo+MpYxEXCI# zPa3Xk8F>yqG+ zP>L@~E6}*@ zj+vc40vUcyhqidwOmj4pk$NZ3!@$Vlus~(P%CJXp!%=sNpomi`9ui11bpHn~ofOdXvwChKQp+HL%C(danSG?R!9 z!OaVj56`q_R@bshdz#?Y&Ar1&lQmiD4!gM9&xF5WKAYlK*AyI4wRqBOCwb?S<3xiS zMghq?OpHWq3T-|$^04mmWRt9ys42WQYu+l63g^Zf>R)4j>Q`#U+4Gg~uPs_oopE#z ZgHE29^7mlPPN1V1JYD@<);T3K0RS#_QELDI literal 0 HcmV?d00001 diff --git a/samples/SupportDesignDemos/res/drawable-xhdpi/ic_action_navigation_menu.png b/samples/SupportDesignDemos/res/drawable-xhdpi/ic_action_navigation_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..595da84a5fcd37b2e4c2666630516bf18244ac17 GIT binary patch literal 273 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=H#}V&Ln`9lPCLlkV8FvXd*+RL zmNc!T)@s*pAGe2CKc8Uv^!}9J_G}7_PdOtRix^^>!VYjvQBPn!#rQ!#fpv{TB~#b} z8HWE%JD9%TD;Ksk{ygEk1cT?>>mCl(tQwZLODfoNjGgW$GnniYnai@oXVR|&EEViq z?lTHq@MDOz0?KpdktRQZVOC6+A5)N;XRQZ=ub!(qqvqr#b}9{O(-%!{nBo~EFXS-U b`(kZ*nt`L~R?|~JKQef_`njxgN@xNA8%ScK literal 0 HcmV?d00001 diff --git a/samples/SupportDesignDemos/res/drawable-xhdpi/ic_android.png b/samples/SupportDesignDemos/res/drawable-xhdpi/ic_android.png new file mode 100644 index 0000000000000000000000000000000000000000..74c6f686a90b1a6c589f7cd906d516fb4d849f5b GIT binary patch literal 367 zcmV-#0g(QQP)^W2G*R|fi}^QwjCIlfPo!&Hvw;U;L8Mj8v#f54;<2G$$}oW^cS>5I~1Uw zo_3vpbSSV)%ef1X4gsXl2S~@i1PV}q0u*48Rx>9c9SZc)vf~7#LxCDy=FI4D-~^;Y z0nOA@Kem5WTre@zpBn&4BqcZ7Cs2R_=zWn{bwKZn%&G%=UxLo^`2k@jUT9Ba0j~f6 N002ovPDHLkV1iY>lga=9 literal 0 HcmV?d00001 diff --git a/samples/SupportDesignDemos/res/drawable-xxhdpi/ic_action_navigation_menu.png b/samples/SupportDesignDemos/res/drawable-xxhdpi/ic_action_navigation_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..3ebee249a566a38b10cd9c391ab29d7a32d55477 GIT binary patch literal 550 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7Ro>V0`Q8;uum9_jbm`%%cthN8Zf3 zRL{BcWTqp#U~})i?*^wm^UoK2znbs$V4h$8kEsnG=PNLBN(f8z=Q9f#s2RxJXH!Y= zNwC?+>v3Slfr=XG2@QsgAAguBFeWoS{+R2)bd2TL1qv|gC=nXZ1{8usLjiWkt-~27Q;C&Pc?^w zr@TcO_p+)s2wQmUd#1UF_dyuQq&R2(2+fP@6j-(OfiA3DGU=4L!kRe_OcvUzGZ}z_ zz6|M0RfHELJYCB9V9k^iCXqFJOc>`(o#aE%HsJ%2nkQK_A}TYm9FVdQ&MBb@0K?eU*#H0l literal 0 HcmV?d00001 diff --git a/samples/SupportDesignDemos/res/drawable-xxhdpi/ic_android.png b/samples/SupportDesignDemos/res/drawable-xxhdpi/ic_android.png new file mode 100644 index 0000000000000000000000000000000000000000..5cb6acd8d38af4ca1eb215e79c3b367d53e80e84 GIT binary patch literal 557 zcmV+|0@D47P)NklJPJII#jjRgdf`5vH zq(~{Nm4fk(a0m+-IK$oS?}EbFZ#f6%!&bwsn*X@ZFM1rInxJDm<|ntPnpV-YS!xX9 zVN7zIXBft=2;^GBQja*=knbo@$aj+6#+=X0wGBGMJ8Xhpb4mImjer`l)3WLPt0gRSFx!;#=I6Zm>Tp- z3A%s@I;R8Olz^`5KehWbA^q>Md!7@AiVVfnoRQs8z zcuUH2-eThhbhV&hO9r%z9cWPt3btfGJMQV078GpBfNJ-&)`Eg98Ibu}0hzCW3aEez zsDKKnfC{L93g~|Y{rgA$wtKp%1qE9&pe6ToK?@4DWI$a8*tjPLGis8PxYYq v-ixPtP<&O!Q#~lYDw|K`py1w%r_K8d)*RWtgax>D00000NkvXXu0mjf*d_dz literal 0 HcmV?d00001 diff --git a/samples/SupportDesignDemos/res/drawable-xxxhdpi/ic_android.png b/samples/SupportDesignDemos/res/drawable-xxxhdpi/ic_android.png new file mode 100644 index 0000000000000000000000000000000000000000..e302a0784f1243d0d8af9b9e4c7b1a3ea6381a72 GIT binary patch literal 687 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD0wg^q?%&M7z*Oex;uuoF`1Y2scSxbg@sHe& zFTFHgG)__ISYRGF`@mYm*^4&#`X5Q?y6<`+xRu?$26qM=JQ_L8Tb8X)2_b`0=u?I zovruiR9JJ2*=)kG7Wew++}a--40rKz_OJf=rs%Nff-6BBhwnV*ogcB>xiX+V|IEi( z)^oz2-Cxqd@}lLkO|oF1_RQy+<D!pI0-N9EvUzaE{({`T1_95~s6Ye%diCeZG~E zU*i{l#>Qaj4JR}9Gv<0Nag06on=?bXS6lME_yaN3OU>UT-?BfDl3n7STVyF!FiCVt z``Kb8u@6iy3xg*%a3BBkddkq^p*?9Y3gJk#t?fL_Av>z zG!jd=v5;xn#N?@Zu&5|7g1Io}f%@8= ztN+hPQv@mxO#N$l*+u8T24_~D4Q(=+rvF4I?{j7k>D^HFWMg6%$Tp@GUnc8ps=mM^ zJk?5M!TSJ)Z&n@2xBun8vfsg!_LnjIrpugPCq?5OTr19RJ1l=b$Minu0u`@s#otiu zX83J8>2Hk9fx7x+dvX2^_wT=W{)q8gwaV|E6%BvoPS)wkEx3RG#(C4X{JcxrUgxpr RodPCA22WQ%mvv4FO#sNPFK7S& literal 0 HcmV?d00001 diff --git a/samples/SupportDesignDemos/res/layout/design_navigation.xml b/samples/SupportDesignDemos/res/layout/design_navigation.xml new file mode 100644 index 000000000..22e900a70 --- /dev/null +++ b/samples/SupportDesignDemos/res/layout/design_navigation.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + diff --git a/samples/SupportDesignDemos/res/layout/design_navigation_header.xml b/samples/SupportDesignDemos/res/layout/design_navigation_header.xml new file mode 100644 index 000000000..a03f0bb5b --- /dev/null +++ b/samples/SupportDesignDemos/res/layout/design_navigation_header.xml @@ -0,0 +1,26 @@ + + + + diff --git a/samples/SupportDesignDemos/res/menu/navigation.xml b/samples/SupportDesignDemos/res/menu/navigation.xml new file mode 100644 index 000000000..b399ef3a9 --- /dev/null +++ b/samples/SupportDesignDemos/res/menu/navigation.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/SupportDesignDemos/res/values-v21/styles.xml b/samples/SupportDesignDemos/res/values-v21/styles.xml new file mode 100644 index 000000000..8faf5e6b7 --- /dev/null +++ b/samples/SupportDesignDemos/res/values-v21/styles.xml @@ -0,0 +1,25 @@ + + + + + + + + diff --git a/samples/SupportDesignDemos/res/values/strings.xml b/samples/SupportDesignDemos/res/values/strings.xml index 7bcfb814e..b2cb6d743 100644 --- a/samples/SupportDesignDemos/res/values/strings.xml +++ b/samples/SupportDesignDemos/res/values/strings.xml @@ -18,12 +18,29 @@ Support Design Demos Floating Action Button/Basic + NavigationView/Usage TabLayout/Usage Text Input Normal size Mini size + Open + Close + Item with icon + Item without icon + Clicked: \"%s\" + Header + Item 1 + Item 2 + Item 3 + Item 4 (disabled) + 1 + Invisible + Subheader + Subitem 1 + Subitem 2 + Fixed Scrollable Center diff --git a/samples/SupportDesignDemos/res/values/styles.xml b/samples/SupportDesignDemos/res/values/styles.xml index ec0588890..a63f93f33 100644 --- a/samples/SupportDesignDemos/res/values/styles.xml +++ b/samples/SupportDesignDemos/res/values/styles.xml @@ -30,4 +30,17 @@ #ff0000 + + + + +