Révision 1
CardView/.google/packaging.yaml | ||
---|---|---|
1 |
|
|
2 |
# GOOGLE SAMPLE PACKAGING DATA |
|
3 |
# |
|
4 |
# This file is used by Google as part of our samples packaging process. |
|
5 |
# End users may safely ignore this file. It has no relevance to other systems. |
|
6 |
--- |
|
7 |
status: PUBLISHED |
|
8 |
technologies: [Android] |
|
9 |
categories: [UI] |
|
10 |
languages: [Java] |
|
11 |
solutions: [Mobile] |
|
12 |
github: android-CardView Sample |
|
13 |
license: apache2 |
CardView/gradlew.bat | ||
---|---|---|
1 |
@if "%DEBUG%" == "" @echo off |
|
2 |
@rem ########################################################################## |
|
3 |
@rem |
|
4 |
@rem Gradle startup script for Windows |
|
5 |
@rem |
|
6 |
@rem ########################################################################## |
|
7 |
|
|
8 |
@rem Set local scope for the variables with windows NT shell |
|
9 |
if "%OS%"=="Windows_NT" setlocal |
|
10 |
|
|
11 |
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. |
|
12 |
set DEFAULT_JVM_OPTS= |
|
13 |
|
|
14 |
set DIRNAME=%~dp0 |
|
15 |
if "%DIRNAME%" == "" set DIRNAME=. |
|
16 |
set APP_BASE_NAME=%~n0 |
|
17 |
set APP_HOME=%DIRNAME% |
|
18 |
|
|
19 |
@rem Find java.exe |
|
20 |
if defined JAVA_HOME goto findJavaFromJavaHome |
|
21 |
|
|
22 |
set JAVA_EXE=java.exe |
|
23 |
%JAVA_EXE% -version >NUL 2>&1 |
|
24 |
if "%ERRORLEVEL%" == "0" goto init |
|
25 |
|
|
26 |
echo. |
|
27 |
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. |
|
28 |
echo. |
|
29 |
echo Please set the JAVA_HOME variable in your environment to match the |
|
30 |
echo location of your Java installation. |
|
31 |
|
|
32 |
goto fail |
|
33 |
|
|
34 |
:findJavaFromJavaHome |
|
35 |
set JAVA_HOME=%JAVA_HOME:"=% |
|
36 |
set JAVA_EXE=%JAVA_HOME%/bin/java.exe |
|
37 |
|
|
38 |
if exist "%JAVA_EXE%" goto init |
|
39 |
|
|
40 |
echo. |
|
41 |
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% |
|
42 |
echo. |
|
43 |
echo Please set the JAVA_HOME variable in your environment to match the |
|
44 |
echo location of your Java installation. |
|
45 |
|
|
46 |
goto fail |
|
47 |
|
|
48 |
:init |
|
49 |
@rem Get command-line arguments, handling Windowz variants |
|
50 |
|
|
51 |
if not "%OS%" == "Windows_NT" goto win9xME_args |
|
52 |
if "%@eval[2+2]" == "4" goto 4NT_args |
|
53 |
|
|
54 |
:win9xME_args |
|
55 |
@rem Slurp the command line arguments. |
|
56 |
set CMD_LINE_ARGS= |
|
57 |
set _SKIP=2 |
|
58 |
|
|
59 |
:win9xME_args_slurp |
|
60 |
if "x%~1" == "x" goto execute |
|
61 |
|
|
62 |
set CMD_LINE_ARGS=%* |
|
63 |
goto execute |
|
64 |
|
|
65 |
:4NT_args |
|
66 |
@rem Get arguments from the 4NT Shell from JP Software |
|
67 |
set CMD_LINE_ARGS=%$ |
|
68 |
|
|
69 |
:execute |
|
70 |
@rem Setup the command line |
|
71 |
|
|
72 |
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar |
|
73 |
|
|
74 |
@rem Execute Gradle |
|
75 |
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% |
|
76 |
|
|
77 |
:end |
|
78 |
@rem End local scope for the variables with windows NT shell |
|
79 |
if "%ERRORLEVEL%"=="0" goto mainEnd |
|
80 |
|
|
81 |
:fail |
|
82 |
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of |
|
83 |
rem the _cmd.exe /c_ return code! |
|
84 |
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 |
|
85 |
exit /b 1 |
|
86 |
|
|
87 |
:mainEnd |
|
88 |
if "%OS%"=="Windows_NT" endlocal |
|
89 |
|
|
90 |
:omega |
CardView/README.md | ||
---|---|---|
1 |
|
|
2 |
Android CardView Sample Sample |
|
3 |
=================================== |
|
4 |
|
|
5 |
This sample demonstrates how to use CardView introduced in the support library in |
|
6 |
Android 5.0. |
|
7 |
|
|
8 |
Pre-requisites |
|
9 |
-------------- |
|
10 |
|
|
11 |
- Android SDK 25 |
|
12 |
- Android Build Tools v25.0.2 |
|
13 |
- Android Support Repository |
|
14 |
|
|
15 |
Getting Started |
|
16 |
--------------- |
|
17 |
|
|
18 |
This sample uses the Gradle build system. To build this project, use the |
|
19 |
"gradlew build" command or use "Import Project" in Android Studio. |
|
20 |
|
|
21 |
Support |
|
22 |
------- |
|
23 |
|
|
24 |
- Google+ Community: https://plus.google.com/communities/105153134372062985968 |
|
25 |
- Stack Overflow: http://stackoverflow.com/questions/tagged/android |
|
26 |
|
|
27 |
If you've found an error in this sample, please file an issue: |
|
28 |
https://github.com/googlesamples/android-CardView Sample |
|
29 |
|
|
30 |
Patches are encouraged, and may be submitted by forking this project and |
|
31 |
submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details. |
|
32 |
|
|
33 |
License |
|
34 |
------- |
|
35 |
|
|
36 |
Copyright 2016 The Android Open Source Project, Inc. |
|
37 |
|
|
38 |
Licensed to the Apache Software Foundation (ASF) under one or more contributor |
|
39 |
license agreements. See the NOTICE file distributed with this work for |
|
40 |
additional information regarding copyright ownership. The ASF licenses this |
|
41 |
file to you under the Apache License, Version 2.0 (the "License"); you may not |
|
42 |
use this file except in compliance with the License. You may obtain a copy of |
|
43 |
the License at |
|
44 |
|
|
45 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
46 |
|
|
47 |
Unless required by applicable law or agreed to in writing, software |
|
48 |
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
|
49 |
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
|
50 |
License for the specific language governing permissions and limitations under |
|
51 |
the License. |
CardView/build.gradle | ||
---|---|---|
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
CardView/settings.gradle | ||
---|---|---|
1 |
include 'Application' |
CardView/gradle/wrapper/gradle-wrapper.properties | ||
---|---|---|
1 |
#Fri Aug 22 14:55:27 JST 2014 |
|
2 |
distributionBase=GRADLE_USER_HOME |
|
3 |
distributionPath=wrapper/dists |
|
4 |
zipStoreBase=GRADLE_USER_HOME |
|
5 |
zipStorePath=wrapper/dists |
|
6 |
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip |
CardView/CONTRIB.md | ||
---|---|---|
1 |
# How to become a contributor and submit your own code |
|
2 |
|
|
3 |
## Contributor License Agreements |
|
4 |
|
|
5 |
We'd love to accept your sample apps and patches! Before we can take them, we |
|
6 |
have to jump a couple of legal hurdles. |
|
7 |
|
|
8 |
Please fill out either the individual or corporate Contributor License Agreement (CLA). |
|
9 |
|
|
10 |
* If you are an individual writing original source code and you're sure you |
|
11 |
own the intellectual property, then you'll need to sign an [individual CLA] |
|
12 |
(https://developers.google.com/open-source/cla/individual). |
|
13 |
* If you work for a company that wants to allow you to contribute your work, |
|
14 |
then you'll need to sign a [corporate CLA] |
|
15 |
(https://developers.google.com/open-source/cla/corporate). |
|
16 |
|
|
17 |
Follow either of the two links above to access the appropriate CLA and |
|
18 |
instructions for how to sign and return it. Once we receive it, we'll be able to |
|
19 |
accept your pull requests. |
|
20 |
|
|
21 |
## Contributing A Patch |
|
22 |
|
|
23 |
1. Submit an issue describing your proposed change to the repo in question. |
|
24 |
1. The repo owner will respond to your issue promptly. |
|
25 |
1. If your proposed change is accepted, and you haven't already done so, sign a |
|
26 |
Contributor License Agreement (see details above). |
|
27 |
1. Fork the desired repo, develop and test your code changes. |
|
28 |
1. Ensure that your code adheres to the existing style in the sample to which |
|
29 |
you are contributing. Refer to the |
|
30 |
[Google Cloud Platform Samples Style Guide] |
|
31 |
(https://github.com/GoogleCloudPlatform/Template/wiki/style.html) for the |
|
32 |
recommended coding standards for this organization. |
|
33 |
1. Ensure that your code has an appropriate set of unit tests which all pass. |
|
34 |
1. Submit a pull request. |
|
35 |
|
CardView/LICENSE | ||
---|---|---|
1 |
Apache License |
|
2 |
-------------- |
|
3 |
|
|
4 |
Version 2.0, January 2004 |
|
5 |
http://www.apache.org/licenses/ |
|
6 |
|
|
7 |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
|
8 |
|
|
9 |
1. Definitions. |
|
10 |
|
|
11 |
"License" shall mean the terms and conditions for use, reproduction, |
|
12 |
and distribution as defined by Sections 1 through 9 of this document. |
|
13 |
|
|
14 |
"Licensor" shall mean the copyright owner or entity authorized by |
|
15 |
the copyright owner that is granting the License. |
|
16 |
|
|
17 |
"Legal Entity" shall mean the union of the acting entity and all |
|
18 |
other entities that control, are controlled by, or are under common |
|
19 |
control with that entity. For the purposes of this definition, |
|
20 |
"control" means (i) the power, direct or indirect, to cause the |
|
21 |
direction or management of such entity, whether by contract or |
|
22 |
otherwise, or (ii) ownership of fifty percent (50%) or more of the |
|
23 |
outstanding shares, or (iii) beneficial ownership of such entity. |
|
24 |
|
|
25 |
"You" (or "Your") shall mean an individual or Legal Entity |
|
26 |
exercising permissions granted by this License. |
|
27 |
|
|
28 |
"Source" form shall mean the preferred form for making modifications, |
|
29 |
including but not limited to software source code, documentation |
|
30 |
source, and configuration files. |
|
31 |
|
|
32 |
"Object" form shall mean any form resulting from mechanical |
|
33 |
transformation or translation of a Source form, including but |
|
34 |
not limited to compiled object code, generated documentation, |
|
35 |
and conversions to other media types. |
|
36 |
|
|
37 |
"Work" shall mean the work of authorship, whether in Source or |
|
38 |
Object form, made available under the License, as indicated by a |
|
39 |
copyright notice that is included in or attached to the work |
|
40 |
(an example is provided in the Appendix below). |
|
41 |
|
|
42 |
"Derivative Works" shall mean any work, whether in Source or Object |
|
43 |
form, that is based on (or derived from) the Work and for which the |
|
44 |
editorial revisions, annotations, elaborations, or other modifications |
|
45 |
represent, as a whole, an original work of authorship. For the purposes |
|
46 |
of this License, Derivative Works shall not include works that remain |
|
47 |
separable from, or merely link (or bind by name) to the interfaces of, |
|
48 |
the Work and Derivative Works thereof. |
|
49 |
|
|
50 |
"Contribution" shall mean any work of authorship, including |
|
51 |
the original version of the Work and any modifications or additions |
|
52 |
to that Work or Derivative Works thereof, that is intentionally |
|
53 |
submitted to Licensor for inclusion in the Work by the copyright owner |
|
54 |
or by an individual or Legal Entity authorized to submit on behalf of |
|
55 |
the copyright owner. For the purposes of this definition, "submitted" |
|
56 |
means any form of electronic, verbal, or written communication sent |
|
57 |
to the Licensor or its representatives, including but not limited to |
|
58 |
communication on electronic mailing lists, source code control systems, |
|
59 |
and issue tracking systems that are managed by, or on behalf of, the |
|
60 |
Licensor for the purpose of discussing and improving the Work, but |
|
61 |
excluding communication that is conspicuously marked or otherwise |
|
62 |
designated in writing by the copyright owner as "Not a Contribution." |
|
63 |
|
|
64 |
"Contributor" shall mean Licensor and any individual or Legal Entity |
|
65 |
on behalf of whom a Contribution has been received by Licensor and |
|
66 |
subsequently incorporated within the Work. |
|
67 |
|
|
68 |
2. Grant of Copyright License. Subject to the terms and conditions of |
|
69 |
this License, each Contributor hereby grants to You a perpetual, |
|
70 |
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
|
71 |
copyright license to reproduce, prepare Derivative Works of, |
|
72 |
publicly display, publicly perform, sublicense, and distribute the |
|
73 |
Work and such Derivative Works in Source or Object form. |
|
74 |
|
|
75 |
3. Grant of Patent License. Subject to the terms and conditions of |
|
76 |
this License, each Contributor hereby grants to You a perpetual, |
|
77 |
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
|
78 |
(except as stated in this section) patent license to make, have made, |
|
79 |
use, offer to sell, sell, import, and otherwise transfer the Work, |
|
80 |
where such license applies only to those patent claims licensable |
|
81 |
by such Contributor that are necessarily infringed by their |
|
82 |
Contribution(s) alone or by combination of their Contribution(s) |
|
83 |
with the Work to which such Contribution(s) was submitted. If You |
|
84 |
institute patent litigation against any entity (including a |
|
85 |
cross-claim or counterclaim in a lawsuit) alleging that the Work |
|
86 |
or a Contribution incorporated within the Work constitutes direct |
|
87 |
or contributory patent infringement, then any patent licenses |
|
88 |
granted to You under this License for that Work shall terminate |
|
89 |
as of the date such litigation is filed. |
|
90 |
|
|
91 |
4. Redistribution. You may reproduce and distribute copies of the |
|
92 |
Work or Derivative Works thereof in any medium, with or without |
|
93 |
modifications, and in Source or Object form, provided that You |
|
94 |
meet the following conditions: |
|
95 |
|
|
96 |
(a) You must give any other recipients of the Work or |
|
97 |
Derivative Works a copy of this License; and |
|
98 |
|
|
99 |
(b) You must cause any modified files to carry prominent notices |
|
100 |
stating that You changed the files; and |
|
101 |
|
|
102 |
(c) You must retain, in the Source form of any Derivative Works |
|
103 |
that You distribute, all copyright, patent, trademark, and |
|
104 |
attribution notices from the Source form of the Work, |
|
105 |
excluding those notices that do not pertain to any part of |
|
106 |
the Derivative Works; and |
|
107 |
|
|
108 |
(d) If the Work includes a "NOTICE" text file as part of its |
|
109 |
distribution, then any Derivative Works that You distribute must |
|
110 |
include a readable copy of the attribution notices contained |
|
111 |
within such NOTICE file, excluding those notices that do not |
|
112 |
pertain to any part of the Derivative Works, in at least one |
|
113 |
of the following places: within a NOTICE text file distributed |
|
114 |
as part of the Derivative Works; within the Source form or |
|
115 |
documentation, if provided along with the Derivative Works; or, |
|
116 |
within a display generated by the Derivative Works, if and |
|
117 |
wherever such third-party notices normally appear. The contents |
|
118 |
of the NOTICE file are for informational purposes only and |
|
119 |
do not modify the License. You may add Your own attribution |
|
120 |
notices within Derivative Works that You distribute, alongside |
|
121 |
or as an addendum to the NOTICE text from the Work, provided |
|
122 |
that such additional attribution notices cannot be construed |
|
123 |
as modifying the License. |
|
124 |
|
|
125 |
You may add Your own copyright statement to Your modifications and |
|
126 |
may provide additional or different license terms and conditions |
|
127 |
for use, reproduction, or distribution of Your modifications, or |
|
128 |
for any such Derivative Works as a whole, provided Your use, |
|
129 |
reproduction, and distribution of the Work otherwise complies with |
|
130 |
the conditions stated in this License. |
|
131 |
|
|
132 |
5. Submission of Contributions. Unless You explicitly state otherwise, |
|
133 |
any Contribution intentionally submitted for inclusion in the Work |
|
134 |
by You to the Licensor shall be under the terms and conditions of |
|
135 |
this License, without any additional terms or conditions. |
|
136 |
Notwithstanding the above, nothing herein shall supersede or modify |
|
137 |
the terms of any separate license agreement you may have executed |
|
138 |
with Licensor regarding such Contributions. |
|
139 |
|
|
140 |
6. Trademarks. This License does not grant permission to use the trade |
|
141 |
names, trademarks, service marks, or product names of the Licensor, |
|
142 |
except as required for reasonable and customary use in describing the |
|
143 |
origin of the Work and reproducing the content of the NOTICE file. |
|
144 |
|
|
145 |
7. Disclaimer of Warranty. Unless required by applicable law or |
|
146 |
agreed to in writing, Licensor provides the Work (and each |
|
147 |
Contributor provides its Contributions) on an "AS IS" BASIS, |
|
148 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
|
149 |
implied, including, without limitation, any warranties or conditions |
|
150 |
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
|
151 |
PARTICULAR PURPOSE. You are solely responsible for determining the |
|
152 |
appropriateness of using or redistributing the Work and assume any |
|
153 |
risks associated with Your exercise of permissions under this License. |
|
154 |
|
|
155 |
8. Limitation of Liability. In no event and under no legal theory, |
|
156 |
whether in tort (including negligence), contract, or otherwise, |
|
157 |
unless required by applicable law (such as deliberate and grossly |
|
158 |
negligent acts) or agreed to in writing, shall any Contributor be |
|
159 |
liable to You for damages, including any direct, indirect, special, |
|
160 |
incidental, or consequential damages of any character arising as a |
|
161 |
result of this License or out of the use or inability to use the |
|
162 |
Work (including but not limited to damages for loss of goodwill, |
|
163 |
work stoppage, computer failure or malfunction, or any and all |
|
164 |
other commercial damages or losses), even if such Contributor |
|
165 |
has been advised of the possibility of such damages. |
|
166 |
|
|
167 |
9. Accepting Warranty or Additional Liability. While redistributing |
|
168 |
the Work or Derivative Works thereof, You may choose to offer, |
|
169 |
and charge a fee for, acceptance of support, warranty, indemnity, |
|
170 |
or other liability obligations and/or rights consistent with this |
|
171 |
License. However, in accepting such obligations, You may act only |
|
172 |
on Your own behalf and on Your sole responsibility, not on behalf |
|
173 |
of any other Contributor, and only if You agree to indemnify, |
|
174 |
defend, and hold each Contributor harmless for any liability |
|
175 |
incurred by, or claims asserted against, such Contributor by reason |
|
176 |
of your accepting any such warranty or additional liability. |
|
177 |
|
|
178 |
END OF TERMS AND CONDITIONS |
|
179 |
|
|
180 |
APPENDIX: How to apply the Apache License to your work. |
|
181 |
|
|
182 |
To apply the Apache License to your work, attach the following |
|
183 |
boilerplate notice, with the fields enclosed by brackets "{}" |
|
184 |
replaced with your own identifying information. (Don't include |
|
185 |
the brackets!) The text should be enclosed in the appropriate |
|
186 |
comment syntax for the file format. We also recommend that a |
|
187 |
file or class name and description of purpose be included on the |
|
188 |
same "printed page" as the copyright notice for easier |
|
189 |
identification within third-party archives. |
|
190 |
|
|
191 |
Copyright {yyyy} {name of copyright owner} |
|
192 |
|
|
193 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
194 |
you may not use this file except in compliance with the License. |
|
195 |
You may obtain a copy of the License at |
|
196 |
|
|
197 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
198 |
|
|
199 |
Unless required by applicable law or agreed to in writing, software |
|
200 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
201 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
202 |
See the License for the specific language governing permissions and |
|
203 |
limitations under the License. |
|
204 |
|
|
205 |
All image and audio files (including *.png, *.jpg, *.svg, *.mp3, *.wav |
|
206 |
and *.ogg) are licensed under the CC-BY-NC license. All other files are |
|
207 |
licensed under the Apache 2 license. |
|
208 |
|
|
209 |
CC-BY-NC License |
|
210 |
---------------- |
|
211 |
|
|
212 |
Attribution-NonCommercial-ShareAlike 4.0 International |
|
213 |
|
|
214 |
======================================================================= |
|
215 |
|
|
216 |
Creative Commons Corporation ("Creative Commons") is not a law firm and |
|
217 |
does not provide legal services or legal advice. Distribution of |
|
218 |
Creative Commons public licenses does not create a lawyer-client or |
|
219 |
other relationship. Creative Commons makes its licenses and related |
|
220 |
information available on an "as-is" basis. Creative Commons gives no |
|
221 |
warranties regarding its licenses, any material licensed under their |
|
222 |
terms and conditions, or any related information. Creative Commons |
|
223 |
disclaims all liability for damages resulting from their use to the |
|
224 |
fullest extent possible. |
|
225 |
|
|
226 |
Using Creative Commons Public Licenses |
|
227 |
|
|
228 |
Creative Commons public licenses provide a standard set of terms and |
|
229 |
conditions that creators and other rights holders may use to share |
|
230 |
original works of authorship and other material subject to copyright |
|
231 |
and certain other rights specified in the public license below. The |
|
232 |
following considerations are for informational purposes only, are not |
|
233 |
exhaustive, and do not form part of our licenses. |
|
234 |
|
|
235 |
Considerations for licensors: Our public licenses are |
|
236 |
intended for use by those authorized to give the public |
|
237 |
permission to use material in ways otherwise restricted by |
|
238 |
copyright and certain other rights. Our licenses are |
|
239 |
irrevocable. Licensors should read and understand the terms |
|
240 |
and conditions of the license they choose before applying it. |
|
241 |
Licensors should also secure all rights necessary before |
|
242 |
applying our licenses so that the public can reuse the |
|
243 |
material as expected. Licensors should clearly mark any |
|
244 |
material not subject to the license. This includes other CC- |
|
245 |
licensed material, or material used under an exception or |
|
246 |
limitation to copyright. More considerations for licensors: |
|
247 |
wiki.creativecommons.org/Considerations_for_licensors |
|
248 |
|
|
249 |
Considerations for the public: By using one of our public |
|
250 |
licenses, a licensor grants the public permission to use the |
|
251 |
licensed material under specified terms and conditions. If |
|
252 |
the licensor's permission is not necessary for any reason--for |
|
253 |
example, because of any applicable exception or limitation to |
|
254 |
copyright--then that use is not regulated by the license. Our |
|
255 |
licenses grant only permissions under copyright and certain |
|
256 |
other rights that a licensor has authority to grant. Use of |
|
257 |
the licensed material may still be restricted for other |
|
258 |
reasons, including because others have copyright or other |
|
259 |
rights in the material. A licensor may make special requests, |
|
260 |
such as asking that all changes be marked or described. |
|
261 |
Although not required by our licenses, you are encouraged to |
|
262 |
respect those requests where reasonable. More_considerations |
|
263 |
for the public: |
|
264 |
wiki.creativecommons.org/Considerations_for_licensees |
|
265 |
|
|
266 |
======================================================================= |
|
267 |
|
|
268 |
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International |
|
269 |
Public License |
|
270 |
|
|
271 |
By exercising the Licensed Rights (defined below), You accept and agree |
|
272 |
to be bound by the terms and conditions of this Creative Commons |
|
273 |
Attribution-NonCommercial-ShareAlike 4.0 International Public License |
|
274 |
("Public License"). To the extent this Public License may be |
|
275 |
interpreted as a contract, You are granted the Licensed Rights in |
|
276 |
consideration of Your acceptance of these terms and conditions, and the |
|
277 |
Licensor grants You such rights in consideration of benefits the |
|
278 |
Licensor receives from making the Licensed Material available under |
|
279 |
these terms and conditions. |
|
280 |
|
|
281 |
|
|
282 |
Section 1 -- Definitions. |
|
283 |
|
|
284 |
a. Adapted Material means material subject to Copyright and Similar |
|
285 |
Rights that is derived from or based upon the Licensed Material |
|
286 |
and in which the Licensed Material is translated, altered, |
|
287 |
arranged, transformed, or otherwise modified in a manner requiring |
|
288 |
permission under the Copyright and Similar Rights held by the |
|
289 |
Licensor. For purposes of this Public License, where the Licensed |
|
290 |
Material is a musical work, performance, or sound recording, |
|
291 |
Adapted Material is always produced where the Licensed Material is |
|
292 |
synched in timed relation with a moving image. |
|
293 |
|
|
294 |
b. Adapter's License means the license You apply to Your Copyright |
|
295 |
and Similar Rights in Your contributions to Adapted Material in |
|
296 |
accordance with the terms and conditions of this Public License. |
|
297 |
|
|
298 |
c. BY-NC-SA Compatible License means a license listed at |
|
299 |
creativecommons.org/compatiblelicenses, approved by Creative |
|
300 |
Commons as essentially the equivalent of this Public License. |
|
301 |
|
|
302 |
d. Copyright and Similar Rights means copyright and/or similar rights |
|
303 |
closely related to copyright including, without limitation, |
|
304 |
performance, broadcast, sound recording, and Sui Generis Database |
|
305 |
Rights, without regard to how the rights are labeled or |
|
306 |
categorized. For purposes of this Public License, the rights |
|
307 |
specified in Section 2(b)(1)-(2) are not Copyright and Similar |
|
308 |
Rights. |
|
309 |
|
|
310 |
e. Effective Technological Measures means those measures that, in the |
|
311 |
absence of proper authority, may not be circumvented under laws |
|
312 |
fulfilling obligations under Article 11 of the WIPO Copyright |
|
313 |
Treaty adopted on December 20, 1996, and/or similar international |
|
314 |
agreements. |
|
315 |
|
|
316 |
f. Exceptions and Limitations means fair use, fair dealing, and/or |
|
317 |
any other exception or limitation to Copyright and Similar Rights |
|
318 |
that applies to Your use of the Licensed Material. |
|
319 |
|
|
320 |
g. License Elements means the license attributes listed in the name |
|
321 |
of a Creative Commons Public License. The License Elements of this |
|
322 |
Public License are Attribution, NonCommercial, and ShareAlike. |
|
323 |
|
|
324 |
h. Licensed Material means the artistic or literary work, database, |
|
325 |
or other material to which the Licensor applied this Public |
|
326 |
License. |
|
327 |
|
|
328 |
i. Licensed Rights means the rights granted to You subject to the |
|
329 |
terms and conditions of this Public License, which are limited to |
|
330 |
all Copyright and Similar Rights that apply to Your use of the |
|
331 |
Licensed Material and that the Licensor has authority to license. |
|
332 |
|
|
333 |
j. Licensor means the individual(s) or entity(ies) granting rights |
|
334 |
under this Public License. |
|
335 |
|
|
336 |
k. NonCommercial means not primarily intended for or directed towards |
|
337 |
commercial advantage or monetary compensation. For purposes of |
|
338 |
this Public License, the exchange of the Licensed Material for |
|
339 |
other material subject to Copyright and Similar Rights by digital |
|
340 |
file-sharing or similar means is NonCommercial provided there is |
|
341 |
no payment of monetary compensation in connection with the |
|
342 |
exchange. |
|
343 |
|
|
344 |
l. Share means to provide material to the public by any means or |
|
345 |
process that requires permission under the Licensed Rights, such |
|
346 |
as reproduction, public display, public performance, distribution, |
|
347 |
dissemination, communication, or importation, and to make material |
|
348 |
available to the public including in ways that members of the |
|
349 |
public may access the material from a place and at a time |
|
350 |
individually chosen by them. |
|
351 |
|
|
352 |
m. Sui Generis Database Rights means rights other than copyright |
|
353 |
resulting from Directive 96/9/EC of the European Parliament and of |
|
354 |
the Council of 11 March 1996 on the legal protection of databases, |
|
355 |
as amended and/or succeeded, as well as other essentially |
|
356 |
equivalent rights anywhere in the world. |
|
357 |
|
|
358 |
n. You means the individual or entity exercising the Licensed Rights |
|
359 |
under this Public License. Your has a corresponding meaning. |
|
360 |
|
|
361 |
|
|
362 |
Section 2 -- Scope. |
|
363 |
|
|
364 |
a. License grant. |
|
365 |
|
|
366 |
1. Subject to the terms and conditions of this Public License, |
|
367 |
the Licensor hereby grants You a worldwide, royalty-free, |
|
368 |
non-sublicensable, non-exclusive, irrevocable license to |
|
369 |
exercise the Licensed Rights in the Licensed Material to: |
|
370 |
|
|
371 |
a. reproduce and Share the Licensed Material, in whole or |
|
372 |
in part, for NonCommercial purposes only; and |
|
373 |
|
|
374 |
b. produce, reproduce, and Share Adapted Material for |
|
375 |
NonCommercial purposes only. |
|
376 |
|
|
377 |
2. Exceptions and Limitations. For the avoidance of doubt, where |
|
378 |
Exceptions and Limitations apply to Your use, this Public |
|
379 |
License does not apply, and You do not need to comply with |
|
380 |
its terms and conditions. |
|
381 |
|
|
382 |
3. Term. The term of this Public License is specified in Section |
|
383 |
6(a). |
|
384 |
|
|
385 |
4. Media and formats; technical modifications allowed. The |
|
386 |
Licensor authorizes You to exercise the Licensed Rights in |
|
387 |
all media and formats whether now known or hereafter created, |
|
388 |
and to make technical modifications necessary to do so. The |
|
389 |
Licensor waives and/or agrees not to assert any right or |
|
390 |
authority to forbid You from making technical modifications |
|
391 |
necessary to exercise the Licensed Rights, including |
|
392 |
technical modifications necessary to circumvent Effective |
|
393 |
Technological Measures. For purposes of this Public License, |
|
394 |
simply making modifications authorized by this Section 2(a) |
|
395 |
(4) never produces Adapted Material. |
|
396 |
|
|
397 |
5. Downstream recipients. |
|
398 |
|
|
399 |
a. Offer from the Licensor -- Licensed Material. Every |
|
400 |
recipient of the Licensed Material automatically |
|
401 |
receives an offer from the Licensor to exercise the |
|
402 |
Licensed Rights under the terms and conditions of this |
|
403 |
Public License. |
|
404 |
|
|
405 |
b. Additional offer from the Licensor -- Adapted Material. |
|
406 |
Every recipient of Adapted Material from You |
|
407 |
automatically receives an offer from the Licensor to |
|
408 |
exercise the Licensed Rights in the Adapted Material |
|
409 |
under the conditions of the Adapter's License You apply. |
|
410 |
|
|
411 |
c. No downstream restrictions. You may not offer or impose |
|
412 |
any additional or different terms or conditions on, or |
|
413 |
apply any Effective Technological Measures to, the |
|
414 |
Licensed Material if doing so restricts exercise of the |
|
415 |
Licensed Rights by any recipient of the Licensed |
|
416 |
Material. |
|
417 |
|
|
418 |
6. No endorsement. Nothing in this Public License constitutes or |
|
419 |
may be construed as permission to assert or imply that You |
|
420 |
are, or that Your use of the Licensed Material is, connected |
|
421 |
with, or sponsored, endorsed, or granted official status by, |
|
422 |
the Licensor or others designated to receive attribution as |
|
423 |
provided in Section 3(a)(1)(A)(i). |
|
424 |
|
|
425 |
b. Other rights. |
|
426 |
|
|
427 |
1. Moral rights, such as the right of integrity, are not |
|
428 |
licensed under this Public License, nor are publicity, |
|
429 |
privacy, and/or other similar personality rights; however, to |
|
430 |
the extent possible, the Licensor waives and/or agrees not to |
|
431 |
assert any such rights held by the Licensor to the limited |
|
432 |
extent necessary to allow You to exercise the Licensed |
|
433 |
Rights, but not otherwise. |
|
434 |
|
|
435 |
2. Patent and trademark rights are not licensed under this |
|
436 |
Public License. |
|
437 |
|
|
438 |
3. To the extent possible, the Licensor waives any right to |
|
439 |
collect royalties from You for the exercise of the Licensed |
|
440 |
Rights, whether directly or through a collecting society |
|
441 |
under any voluntary or waivable statutory or compulsory |
|
442 |
licensing scheme. In all other cases the Licensor expressly |
|
443 |
reserves any right to collect such royalties, including when |
|
444 |
the Licensed Material is used other than for NonCommercial |
|
445 |
purposes. |
|
446 |
|
|
447 |
|
|
448 |
Section 3 -- License Conditions. |
|
449 |
|
|
450 |
Your exercise of the Licensed Rights is expressly made subject to the |
|
451 |
following conditions. |
|
452 |
|
|
453 |
a. Attribution. |
|
454 |
|
|
455 |
1. If You Share the Licensed Material (including in modified |
|
456 |
form), You must: |
|
457 |
|
|
458 |
a. retain the following if it is supplied by the Licensor |
|
459 |
with the Licensed Material: |
|
460 |
|
|
461 |
i. identification of the creator(s) of the Licensed |
|
462 |
Material and any others designated to receive |
|
463 |
attribution, in any reasonable manner requested by |
|
464 |
the Licensor (including by pseudonym if |
|
465 |
designated); |
|
466 |
|
|
467 |
ii. a copyright notice; |
|
468 |
|
|
469 |
iii. a notice that refers to this Public License; |
|
470 |
|
|
471 |
iv. a notice that refers to the disclaimer of |
|
472 |
warranties; |
|
473 |
|
|
474 |
v. a URI or hyperlink to the Licensed Material to the |
|
475 |
extent reasonably practicable; |
|
476 |
|
|
477 |
b. indicate if You modified the Licensed Material and |
|
478 |
retain an indication of any previous modifications; and |
|
479 |
|
|
480 |
c. indicate the Licensed Material is licensed under this |
|
481 |
Public License, and include the text of, or the URI or |
|
482 |
hyperlink to, this Public License. |
|
483 |
|
|
484 |
2. You may satisfy the conditions in Section 3(a)(1) in any |
|
485 |
reasonable manner based on the medium, means, and context in |
|
486 |
which You Share the Licensed Material. For example, it may be |
|
487 |
reasonable to satisfy the conditions by providing a URI or |
|
488 |
hyperlink to a resource that includes the required |
|
489 |
information. |
|
490 |
3. If requested by the Licensor, You must remove any of the |
|
491 |
information required by Section 3(a)(1)(A) to the extent |
|
492 |
reasonably practicable. |
|
493 |
|
|
494 |
b. ShareAlike. |
|
495 |
|
|
496 |
In addition to the conditions in Section 3(a), if You Share |
|
497 |
Adapted Material You produce, the following conditions also apply. |
|
498 |
|
|
499 |
1. The Adapter's License You apply must be a Creative Commons |
|
500 |
license with the same License Elements, this version or |
|
501 |
later, or a BY-NC-SA Compatible License. |
|
502 |
|
|
503 |
2. You must include the text of, or the URI or hyperlink to, the |
|
504 |
Adapter's License You apply. You may satisfy this condition |
|
505 |
in any reasonable manner based on the medium, means, and |
|
506 |
context in which You Share Adapted Material. |
|
507 |
|
|
508 |
3. You may not offer or impose any additional or different terms |
|
509 |
or conditions on, or apply any Effective Technological |
|
510 |
Measures to, Adapted Material that restrict exercise of the |
|
511 |
rights granted under the Adapter's License You apply. |
|
512 |
|
|
513 |
|
|
514 |
Section 4 -- Sui Generis Database Rights. |
|
515 |
|
|
516 |
Where the Licensed Rights include Sui Generis Database Rights that |
|
517 |
apply to Your use of the Licensed Material: |
|
518 |
|
|
519 |
a. for the avoidance of doubt, Section 2(a)(1) grants You the right |
|
520 |
to extract, reuse, reproduce, and Share all or a substantial |
|
521 |
portion of the contents of the database for NonCommercial purposes |
|
522 |
only; |
|
523 |
|
|
524 |
b. if You include all or a substantial portion of the database |
|
525 |
contents in a database in which You have Sui Generis Database |
|
526 |
Rights, then the database in which You have Sui Generis Database |
|
527 |
Rights (but not its individual contents) is Adapted Material, |
|
528 |
including for purposes of Section 3(b); and |
|
529 |
|
|
530 |
c. You must comply with the conditions in Section 3(a) if You Share |
|
531 |
all or a substantial portion of the contents of the database. |
|
532 |
|
|
533 |
For the avoidance of doubt, this Section 4 supplements and does not |
|
534 |
replace Your obligations under this Public License where the Licensed |
|
535 |
Rights include other Copyright and Similar Rights. |
|
536 |
|
|
537 |
|
|
538 |
Section 5 -- Disclaimer of Warranties and Limitation of Liability. |
|
539 |
|
|
540 |
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE |
|
541 |
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS |
|
542 |
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF |
|
543 |
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, |
|
544 |
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, |
|
545 |
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR |
|
546 |
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, |
|
547 |
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT |
|
548 |
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT |
|
549 |
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. |
|
550 |
|
|
551 |
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE |
|
552 |
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, |
|
553 |
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, |
|
554 |
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, |
|
555 |
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR |
|
556 |
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN |
|
557 |
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR |
|
558 |
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR |
|
559 |
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. |
|
560 |
|
|
561 |
c. The disclaimer of warranties and limitation of liability provided |
|
562 |
above shall be interpreted in a manner that, to the extent |
|
563 |
possible, most closely approximates an absolute disclaimer and |
|
564 |
waiver of all liability. |
|
565 |
|
|
566 |
|
|
567 |
Section 6 -- Term and Termination. |
|
568 |
|
|
569 |
a. This Public License applies for the term of the Copyright and |
|
570 |
Similar Rights licensed here. However, if You fail to comply with |
|
571 |
this Public License, then Your rights under this Public License |
|
572 |
terminate automatically. |
|
573 |
|
|
574 |
b. Where Your right to use the Licensed Material has terminated under |
|
575 |
Section 6(a), it reinstates: |
|
576 |
|
|
577 |
1. automatically as of the date the violation is cured, provided |
|
578 |
it is cured within 30 days of Your discovery of the |
|
579 |
violation; or |
|
580 |
|
|
581 |
2. upon express reinstatement by the Licensor. |
|
582 |
|
|
583 |
For the avoidance of doubt, this Section 6(b) does not affect any |
|
584 |
right the Licensor may have to seek remedies for Your violations |
|
585 |
of this Public License. |
|
586 |
|
|
587 |
c. For the avoidance of doubt, the Licensor may also offer the |
|
588 |
Licensed Material under separate terms or conditions or stop |
|
589 |
distributing the Licensed Material at any time; however, doing so |
|
590 |
will not terminate this Public License. |
|
591 |
|
|
592 |
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public |
|
593 |
License. |
|
594 |
|
|
595 |
|
|
596 |
Section 7 -- Other Terms and Conditions. |
|
597 |
|
|
598 |
a. The Licensor shall not be bound by any additional or different |
|
599 |
terms or conditions communicated by You unless expressly agreed. |
|
600 |
|
|
601 |
b. Any arrangements, understandings, or agreements regarding the |
|
602 |
Licensed Material not stated herein are separate from and |
|
603 |
independent of the terms and conditions of this Public License. |
|
604 |
|
|
605 |
|
|
606 |
Section 8 -- Interpretation. |
|
607 |
|
|
608 |
a. For the avoidance of doubt, this Public License does not, and |
|
609 |
shall not be interpreted to, reduce, limit, restrict, or impose |
|
610 |
conditions on any use of the Licensed Material that could lawfully |
|
611 |
be made without permission under this Public License. |
|
612 |
|
|
613 |
b. To the extent possible, if any provision of this Public License is |
|
614 |
deemed unenforceable, it shall be automatically reformed to the |
|
615 |
minimum extent necessary to make it enforceable. If the provision |
|
616 |
cannot be reformed, it shall be severed from this Public License |
|
617 |
without affecting the enforceability of the remaining terms and |
|
618 |
conditions. |
|
619 |
|
|
620 |
c. No term or condition of this Public License will be waived and no |
|
621 |
failure to comply consented to unless expressly agreed to by the |
|
622 |
Licensor. |
|
623 |
|
|
624 |
d. Nothing in this Public License constitutes or may be interpreted |
|
625 |
as a limitation upon, or waiver of, any privileges and immunities |
|
626 |
that apply to the Licensor or You, including from the legal |
|
627 |
processes of any jurisdiction or authority. |
|
628 |
|
|
629 |
======================================================================= |
|
630 |
|
|
631 |
Creative Commons is not a party to its public licenses. |
|
632 |
Notwithstanding, Creative Commons may elect to apply one of its public |
|
633 |
licenses to material it publishes and in those instances will be |
|
634 |
considered the "Licensor." Except for the limited purpose of indicating |
|
635 |
that material is shared under a Creative Commons public license or as |
|
636 |
otherwise permitted by the Creative Commons policies published at |
|
637 |
creativecommons.org/policies, Creative Commons does not authorize the |
|
638 |
use of the trademark "Creative Commons" or any other trademark or logo |
|
639 |
of Creative Commons without its prior written consent including, |
|
640 |
without limitation, in connection with any unauthorized modifications |
|
641 |
to any of its public licenses or any other arrangements, |
|
642 |
understandings, or agreements concerning use of licensed material. For |
|
643 |
the avoidance of doubt, this paragraph does not form part of the public |
|
644 |
licenses. |
|
645 |
|
|
646 |
Creative Commons may be contacted at creativecommons.org. |
|
647 |
|
CardView/Application/src/main/AndroidManifest.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<!-- |
|
3 |
Copyright 2014 The Android Open Source Project |
|
4 |
|
|
5 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
6 |
you may not use this file except in compliance with the License. |
|
7 |
You may obtain a copy of the License at |
|
8 |
|
|
9 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
10 |
|
|
11 |
Unless required by applicable law or agreed to in writing, software |
|
12 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
13 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 |
See the License for the specific language governing permissions and |
|
15 |
limitations under the License. |
|
16 |
--> |
|
17 |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" |
|
18 |
package="com.example.android.cardview" |
|
19 |
android:versionCode="1" |
|
20 |
android:versionName="1.0" > |
|
21 |
|
|
22 |
<application |
|
23 |
android:allowBackup="true" |
|
24 |
android:icon="@drawable/ic_launcher" |
|
25 |
android:label="@string/app_name" |
|
26 |
android:theme="@style/AppTheme" > |
|
27 |
<activity |
|
28 |
android:name=".CardViewActivity" |
|
29 |
android:label="@string/app_name" > |
|
30 |
<intent-filter> |
|
31 |
<action android:name="android.intent.action.MAIN" /> |
|
32 |
<category android:name="android.intent.category.LAUNCHER" /> |
|
33 |
</intent-filter> |
|
34 |
</activity> |
|
35 |
</application> |
|
36 |
|
|
37 |
</manifest> |
CardView/Application/src/main/res/layout/activity_card_view.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<!-- |
|
3 |
Copyright 2014 The Android Open Source Project |
|
4 |
|
|
5 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
6 |
you may not use this file except in compliance with the License. |
|
7 |
You may obtain a copy of the License at |
|
8 |
|
|
9 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
10 |
|
|
11 |
Unless required by applicable law or agreed to in writing, software |
|
12 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
13 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 |
See the License for the specific language governing permissions and |
|
15 |
limitations under the License. |
|
16 |
--> |
|
17 |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
18 |
xmlns:tools="http://schemas.android.com/tools" |
|
19 |
android:id="@+id/container" |
|
20 |
android:layout_width="match_parent" |
|
21 |
android:layout_height="match_parent" |
|
22 |
android:paddingLeft="@dimen/activity_horizontal_margin" |
|
23 |
android:paddingRight="@dimen/activity_horizontal_margin" |
|
24 |
android:paddingTop="@dimen/activity_vertical_margin" |
|
25 |
android:paddingBottom="@dimen/activity_vertical_margin" |
|
26 |
tools:context="com.example.android.cardview.CardViewActivity" |
|
27 |
tools:ignore="MergeRootFrame" /> |
CardView/Application/src/main/res/layout/fragment_card_view.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<!-- |
|
3 |
Copyright 2014 The Android Open Source Project |
|
4 |
|
|
5 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
6 |
you may not use this file except in compliance with the License. |
|
7 |
You may obtain a copy of the License at |
|
8 |
|
|
9 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
10 |
|
|
11 |
Unless required by applicable law or agreed to in writing, software |
|
12 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
13 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 |
See the License for the specific language governing permissions and |
|
15 |
limitations under the License. |
|
16 |
--> |
|
17 |
<ScrollView |
|
18 |
xmlns:android="http://schemas.android.com/apk/res/android" |
|
19 |
xmlns:card_view="http://schemas.android.com/apk/res-auto" |
|
20 |
android:layout_height="match_parent" |
|
21 |
android:layout_width="match_parent" |
|
22 |
> |
|
23 |
|
|
24 |
<LinearLayout android:layout_width="match_parent" |
|
25 |
android:layout_height="wrap_content" |
|
26 |
android:orientation="vertical" |
|
27 |
android:paddingBottom="@dimen/activity_vertical_margin" |
|
28 |
android:paddingTop="@dimen/activity_vertical_margin" |
|
29 |
android:paddingLeft="@dimen/activity_horizontal_margin" |
|
30 |
android:paddingRight="@dimen/activity_horizontal_margin" |
|
31 |
> |
|
32 |
<android.support.v7.widget.CardView |
|
33 |
android:id="@+id/cardview" |
|
34 |
android:layout_width="fill_parent" |
|
35 |
android:layout_height="wrap_content" |
|
36 |
android:elevation="100dp" |
|
37 |
card_view:cardBackgroundColor="@color/cardview_initial_background" |
|
38 |
card_view:cardCornerRadius="8dp" |
|
39 |
android:layout_marginLeft="@dimen/margin_large" |
|
40 |
android:layout_marginRight="@dimen/margin_large" |
|
41 |
> |
|
42 |
|
|
43 |
<TextView |
|
44 |
android:layout_width="wrap_content" |
|
45 |
android:layout_height="wrap_content" |
|
46 |
android:layout_margin="@dimen/margin_medium" |
|
47 |
android:text="@string/cardview_contents" |
|
48 |
/> |
|
49 |
</android.support.v7.widget.CardView> |
|
50 |
|
|
51 |
<LinearLayout |
|
52 |
android:layout_width="fill_parent" |
|
53 |
android:layout_height="wrap_content" |
|
54 |
android:layout_marginTop="@dimen/margin_large" |
|
55 |
android:orientation="horizontal" |
|
56 |
> |
|
57 |
<TextView |
|
58 |
android:layout_width="@dimen/seekbar_label_length" |
|
59 |
android:layout_height="wrap_content" |
|
60 |
android:layout_gravity="center_vertical" |
|
61 |
android:text="@string/cardview_radius_seekbar_text" |
|
62 |
/> |
|
63 |
<SeekBar |
|
64 |
android:id="@+id/cardview_radius_seekbar" |
|
65 |
android:layout_width="fill_parent" |
|
66 |
android:layout_height="wrap_content" |
|
67 |
android:layout_margin="@dimen/margin_medium" |
|
68 |
/> |
|
69 |
</LinearLayout> |
|
70 |
|
|
71 |
<LinearLayout |
|
72 |
android:layout_width="fill_parent" |
|
73 |
android:layout_height="wrap_content" |
|
74 |
android:orientation="horizontal" |
|
75 |
> |
|
76 |
<TextView |
|
77 |
android:layout_width="@dimen/seekbar_label_length" |
|
78 |
android:layout_height="wrap_content" |
|
79 |
android:layout_gravity="center_vertical" |
|
80 |
android:text="@string/cardview_elevation_seekbar_text" |
|
81 |
/> |
|
82 |
<SeekBar |
|
83 |
android:id="@+id/cardview_elevation_seekbar" |
|
84 |
android:layout_width="fill_parent" |
|
85 |
android:layout_height="wrap_content" |
|
86 |
android:layout_margin="@dimen/margin_medium" |
|
87 |
/> |
|
88 |
</LinearLayout> |
|
89 |
</LinearLayout> |
|
90 |
</ScrollView> |
|
91 |
|
CardView/Application/src/main/res/values/template-dimens.xml | ||
---|---|---|
1 |
<!-- |
|
2 |
Copyright 2013 The Android Open Source Project |
|
3 |
|
|
4 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
you may not use this file except in compliance with the License. |
|
6 |
You may obtain a copy of the License at |
|
7 |
|
|
8 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
|
|
10 |
Unless required by applicable law or agreed to in writing, software |
|
11 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
See the License for the specific language governing permissions and |
|
14 |
limitations under the License. |
|
15 |
--> |
|
16 |
|
|
17 |
<resources> |
|
18 |
|
|
19 |
<!-- Define standard dimensions to comply with Holo-style grids and rhythm. --> |
|
20 |
|
|
21 |
<dimen name="margin_tiny">4dp</dimen> |
|
22 |
<dimen name="margin_small">8dp</dimen> |
|
23 |
<dimen name="margin_medium">16dp</dimen> |
|
24 |
<dimen name="margin_large">32dp</dimen> |
|
25 |
<dimen name="margin_huge">64dp</dimen> |
|
26 |
|
|
27 |
<!-- Semantic definitions --> |
|
28 |
|
|
29 |
<dimen name="horizontal_page_margin">@dimen/margin_medium</dimen> |
|
30 |
<dimen name="vertical_page_margin">@dimen/margin_medium</dimen> |
|
31 |
|
|
32 |
</resources> |
CardView/Application/src/main/res/values/strings.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<!-- |
|
3 |
Copyright 2014 The Android Open Source Project |
|
4 |
|
|
5 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
6 |
you may not use this file except in compliance with the License. |
|
7 |
You may obtain a copy of the License at |
|
8 |
|
|
9 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
10 |
|
|
11 |
Unless required by applicable law or agreed to in writing, software |
|
12 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
13 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 |
See the License for the specific language governing permissions and |
|
15 |
limitations under the License. |
|
16 |
--> |
|
17 |
<resources> |
|
18 |
<string name="cardview_contents">This is a CardView widget. CardView widgets can have |
|
19 |
shadows and rounded corners. |
|
20 |
\n\nTo create a card with a shadow, use the <font fgcolor="#FFFFFFFF">android:elevation</font> |
|
21 |
attribute. |
|
22 |
\n\nTo set the corner radius in your layouts, use the <font |
|
23 |
fgcolor="#FFFFFFFF">card_view:cardCornerRadius</font> attribute. |
|
24 |
</string> |
|
25 |
<string name="cardview_radius_seekbar_text">Radius</string> |
|
26 |
<string name="cardview_elevation_seekbar_text">Elevation</string> |
|
27 |
</resources> |
CardView/Application/src/main/res/values/template-styles.xml | ||
---|---|---|
1 |
<!-- |
|
2 |
Copyright 2013 The Android Open Source Project |
|
3 |
|
|
4 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
you may not use this file except in compliance with the License. |
|
6 |
You may obtain a copy of the License at |
|
7 |
|
|
8 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
|
|
10 |
Unless required by applicable law or agreed to in writing, software |
|
11 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
See the License for the specific language governing permissions and |
|
14 |
limitations under the License. |
|
15 |
--> |
|
16 |
|
|
17 |
<resources> |
|
18 |
|
|
19 |
<!-- Activity themes --> |
|
20 |
|
|
21 |
<style name="Theme.Base" parent="android:Theme.Light" /> |
|
22 |
|
|
23 |
<style name="Theme.Sample" parent="Theme.Base" /> |
|
24 |
|
|
25 |
<style name="AppTheme" parent="Theme.Sample" /> |
|
26 |
<!-- Widget styling --> |
|
27 |
|
|
28 |
<style name="Widget" /> |
|
29 |
|
|
30 |
<style name="Widget.SampleMessage"> |
|
31 |
<item name="android:textAppearance">?android:textAppearanceMedium</item> |
|
32 |
<item name="android:lineSpacingMultiplier">1.1</item> |
|
33 |
</style> |
|
34 |
|
|
35 |
<style name="Widget.SampleMessageTile"> |
|
36 |
<item name="android:background">@drawable/tile</item> |
|
37 |
<item name="android:shadowColor">#7F000000</item> |
|
38 |
<item name="android:shadowDy">-3.5</item> |
|
39 |
<item name="android:shadowRadius">2</item> |
|
40 |
</style> |
|
41 |
|
|
42 |
</resources> |
CardView/Application/src/main/res/values/dimens.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<!-- |
|
3 |
Copyright 2014 The Android Open Source Project |
|
4 |
|
|
5 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
6 |
you may not use this file except in compliance with the License. |
|
7 |
You may obtain a copy of the License at |
|
8 |
|
|
9 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
10 |
|
|
11 |
Unless required by applicable law or agreed to in writing, software |
|
12 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
13 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 |
See the License for the specific language governing permissions and |
|
15 |
limitations under the License. |
|
16 |
--> |
|
17 |
<resources> |
|
18 |
<!-- Default screen margins, per the Android Design guidelines. --> |
|
19 |
<dimen name="activity_horizontal_margin">16dp</dimen> |
|
20 |
<dimen name="activity_vertical_margin">16dp</dimen> |
|
21 |
<dimen name="seekbar_label_length">70dp</dimen> |
|
22 |
</resources> |
CardView/Application/src/main/res/values/base-strings.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<!-- |
|
3 |
Copyright 2013 The Android Open Source Project |
|
4 |
|
|
5 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
6 |
you may not use this file except in compliance with the License. |
|
7 |
You may obtain a copy of the License at |
|
8 |
|
|
9 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
10 |
|
|
11 |
Unless required by applicable law or agreed to in writing, software |
|
12 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
13 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 |
See the License for the specific language governing permissions and |
|
15 |
limitations under the License. |
|
16 |
--> |
|
17 |
|
|
18 |
<resources> |
|
19 |
<string name="app_name">CardView Sample</string> |
|
20 |
<string name="intro_message"> |
|
21 |
<![CDATA[ |
|
22 |
|
|
23 |
|
|
24 |
This sample demonstrates how to use CardView introduced in the support library in |
|
25 |
Android 5.0. |
|
26 |
|
|
27 |
|
|
28 |
]]> |
|
29 |
</string> |
|
30 |
</resources> |
CardView/Application/src/main/res/values/colors.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<!-- |
|
3 |
Copyright 2014 The Android Open Source Project |
|
4 |
|
|
5 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
6 |
you may not use this file except in compliance with the License. |
|
7 |
You may obtain a copy of the License at |
|
8 |
|
|
9 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
10 |
|
|
11 |
Unless required by applicable law or agreed to in writing, software |
|
12 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
13 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 |
See the License for the specific language governing permissions and |
|
15 |
limitations under the License. |
|
16 |
--> |
|
17 |
<resources> |
|
18 |
<color name="cardview_initial_background">#71C3DE</color> |
|
19 |
</resources> |
CardView/Application/src/main/res/values-sw600dp/template-dimens.xml | ||
---|---|---|
1 |
<!-- |
|
2 |
Copyright 2013 The Android Open Source Project |
|
3 |
|
|
4 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
you may not use this file except in compliance with the License. |
|
6 |
You may obtain a copy of the License at |
|
7 |
|
|
8 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
|
|
10 |
Unless required by applicable law or agreed to in writing, software |
|
11 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
See the License for the specific language governing permissions and |
|
14 |
limitations under the License. |
|
15 |
--> |
|
16 |
|
|
17 |
<resources> |
|
18 |
|
|
19 |
<!-- Semantic definitions --> |
|
20 |
|
|
21 |
<dimen name="horizontal_page_margin">@dimen/margin_huge</dimen> |
|
22 |
<dimen name="vertical_page_margin">@dimen/margin_medium</dimen> |
|
23 |
|
|
24 |
</resources> |
CardView/Application/src/main/res/values-sw600dp/template-styles.xml | ||
---|---|---|
1 |
<!-- |
|
2 |
Copyright 2013 The Android Open Source Project |
|
3 |
|
|
4 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
you may not use this file except in compliance with the License. |
|
6 |
You may obtain a copy of the License at |
|
7 |
|
|
8 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
|
|
10 |
Unless required by applicable law or agreed to in writing, software |
|
11 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
See the License for the specific language governing permissions and |
|
14 |
limitations under the License. |
|
15 |
--> |
|
16 |
|
|
17 |
<resources> |
|
18 |
|
|
19 |
<style name="Widget.SampleMessage"> |
|
20 |
<item name="android:textAppearance">?android:textAppearanceLarge</item> |
|
21 |
<item name="android:lineSpacingMultiplier">1.2</item> |
|
22 |
<item name="android:shadowDy">-6.5</item> |
|
23 |
</style> |
|
24 |
|
|
25 |
</resources> |
CardView/Application/src/main/res/values-v11/template-styles.xml | ||
---|---|---|
1 |
<!-- |
|
2 |
Copyright 2013 The Android Open Source Project |
|
3 |
|
|
4 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
you may not use this file except in compliance with the License. |
|
6 |
You may obtain a copy of the License at |
|
7 |
|
|
8 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
|
|
10 |
Unless required by applicable law or agreed to in writing, software |
|
11 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
See the License for the specific language governing permissions and |
|
14 |
limitations under the License. |
|
15 |
--> |
|
16 |
|
|
17 |
<resources> |
|
18 |
|
|
19 |
<!-- Activity themes --> |
|
20 |
<style name="Theme.Base" parent="android:Theme.Holo.Light" /> |
|
21 |
|
|
22 |
</resources> |
CardView/Application/src/main/res/values-v21/base-template-styles.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<!-- |
|
3 |
Copyright 2013 The Android Open Source Project |
|
4 |
|
|
5 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
6 |
you may not use this file except in compliance with the License. |
|
7 |
You may obtain a copy of the License at |
|
8 |
|
|
9 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
10 |
|
|
11 |
Unless required by applicable law or agreed to in writing, software |
|
12 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
13 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 |
See the License for the specific language governing permissions and |
|
15 |
limitations under the License. |
|
16 |
--> |
|
17 |
|
|
18 |
<resources> |
|
19 |
|
|
20 |
<!-- Activity themes --> |
|
21 |
<style name="Theme.Base" parent="android:Theme.Material.Light"> |
|
22 |
</style> |
|
23 |
|
|
24 |
</resources> |
CardView/Application/src/main/res/values-v21/base-colors.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<!-- |
|
3 |
Copyright 2013 The Android Open Source Project |
|
4 |
|
|
5 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
6 |
you may not use this file except in compliance with the License. |
|
7 |
You may obtain a copy of the License at |
|
8 |
|
|
9 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
10 |
|
|
11 |
Unless required by applicable law or agreed to in writing, software |
|
12 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
13 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 |
See the License for the specific language governing permissions and |
|
15 |
limitations under the License. |
|
16 |
--> |
|
17 |
|
|
18 |
<resources> |
|
19 |
|
|
20 |
|
|
21 |
</resources> |
Formats disponibles : Unified diff