• Home
Name Date Size #Lines LOC

..--

Application/03-May-2024-853448

buildSrc/03-May-2024-1913

gradle/wrapper/03-May-2024-65

CONTRIB.mdD03-May-20241.6 KiB3627

LICENSED03-May-202411.1 KiB204170

README.mdD03-May-20242.2 KiB6042

build.gradleD03-May-2024250 119

gradlewD03-May-20245.2 KiB173128

gradlew.batD03-May-20242.2 KiB8561

packaging.yamlD03-May-2024478 1610

settings.gradleD03-May-202422 21

template-params.xmlD03-May-20241.7 KiB4025

README.md

1
2Android DrawableTinting Sample
3===================================
4
5Sample that shows applying tinting and color filters to Drawables both programmatically
6and as Drawable resources in XML.
7
8Tinting is set on a nine-patch drawable through the "tint" and "tintMode" parameters.
9A color state list is referenced as the tint color, which defines colors for different
10states of a View (for example disabled/enabled, focused, pressed or selected).
11
12Programmatically, tinting is applied to a Drawable through its "setColorFilter" method,
13with a reference to a color and a PorterDuff blend mode. The color and blend mode can be
14changed from the UI to see the effect of different options.
15
16Pre-requisites
17--------------
18
19- Android SDK 28
20- Android Build Tools v28.0.3
21- Android Support Repository
22
23Getting Started
24---------------
25
26This sample uses the Gradle build system. To build this project, use the
27"gradlew build" command or use "Import Project" in Android Studio.
28
29Support
30-------
31
32- Google+ Community: https://plus.google.com/communities/105153134372062985968
33- Stack Overflow: http://stackoverflow.com/questions/tagged/android
34
35If you've found an error in this sample, please file an issue:
36https://github.com/googlesamples/android-DrawableTinting
37
38Patches are encouraged, and may be submitted by forking this project and
39submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.
40
41License
42-------
43
44Copyright 2019 The Android Open Source Project, Inc.
45
46Licensed to the Apache Software Foundation (ASF) under one or more contributor
47license agreements.  See the NOTICE file distributed with this work for
48additional information regarding copyright ownership.  The ASF licenses this
49file to you under the Apache License, Version 2.0 (the "License"); you may not
50use this file except in compliance with the License.  You may obtain a copy of
51the License at
52
53http://www.apache.org/licenses/LICENSE-2.0
54
55Unless required by applicable law or agreed to in writing, software
56distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
57WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
58License for the specific language governing permissions and limitations under
59the License.
60