• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 Copyright 2014 The Android Open Source Project
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<sample>
17    <name>DrawableTinting</name>
18    <group>UI</group>
19    <package>com.example.android.drawabletinting</package>
20    <!-- change minSdk if needed-->
21    <minSdk>21</minSdk>
22    <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.
27            \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
29            states of a View (for example disabled/enabled, focused, pressed or selected).
30            \n\nProgrammatically, tinting is applied to a Drawable through its "setColorFilter" method,
31            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>
36    <template src="base"/>
37    <template src="FragmentView"/>
38    <common src="logger"/>
39    <common src="activities"/>
40</sample>