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