blob: dfc3960a00ccc57eab7511c387d860644bb4adac [file] [log] [blame]
Jan-Felix Schmakeitce9fa152014-09-08 17:36:29 +10001<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 Copyright 2014 The Android Open Source Project
Jan-Felix Schmakeitce9fa152014-09-08 17:36:29 +10004 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-->
Jan-Felix Schmakeitce9fa152014-09-08 17:36:29 +100016<sample>
17 <name>DrawableTinting</name>
18 <group>UI</group>
19 <package>com.example.android.drawabletinting</package>
Jan-Felix Schmakeitce9fa152014-09-08 17:36:29 +100020 <!-- change minSdk if needed-->
Trevor Johns34038302014-10-16 02:33:29 -070021 <minSdk>21</minSdk>
Jan-Felix Schmakeitce9fa152014-09-08 17:36:29 +100022 <strings>
23 <intro>
24 <![CDATA[
25 Sample that shows applying tinting and color filters to Drawables both programmatically
26 and as Drawable resources in XML.
Trevor Johnsc208bcc2014-09-16 12:03:00 -070027 \n\nTinting is set on a nine-patch drawable through the "tint" and "tintMode" parameters.
28 A color state list is referenced as the tint color, which defines colors for different
Jan-Felix Schmakeitce9fa152014-09-08 17:36:29 +100029 states of a View (for example disabled/enabled, focused, pressed or selected).
Trevor Johnsc208bcc2014-09-16 12:03:00 -070030 \n\nProgrammatically, tinting is applied to a Drawable through its "setColorFilter" method,
Jan-Felix Schmakeitce9fa152014-09-08 17:36:29 +100031 with a reference to a color and a PorterDuff blend mode. The color and blend mode can be
32 changed from the UI to see the effect of different options.
33 ]]>
34 </intro>
35 </strings>
Jan-Felix Schmakeitce9fa152014-09-08 17:36:29 +100036 <template src="base"/>
37 <template src="FragmentView"/>
Jan-Felix Schmakeitce9fa152014-09-08 17:36:29 +100038 <common src="logger"/>
39 <common src="activities"/>
Trevor Johnsce73a612014-09-16 16:31:07 -070040</sample>