1/* 2 * Copyright (C) 2014 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 17package android.support.v4.graphics.drawable; 18 19import android.content.res.ColorStateList; 20import android.graphics.PorterDuff; 21import android.graphics.drawable.Drawable; 22 23/** 24 * Implementation of drawable compatibility that can call L APIs. 25 */ 26class DrawableCompatL { 27 28 public static void setHotspot(Drawable drawable, float x, float y) { 29 drawable.setHotspot(x, y); 30 } 31 32 public static void setHotspotBounds(Drawable drawable, int left, int top, 33 int right, int bottom) { 34 drawable.setHotspotBounds( left, top, right, bottom); 35 } 36 37 public static void setTint(Drawable drawable, int tint) { 38 drawable.setTint(tint); 39 } 40 41 public static void setTintList(Drawable drawable, ColorStateList tint) { 42 drawable.setTintList(tint); 43 } 44 45 public static void setTintMode(Drawable drawable, PorterDuff.Mode tintMode) { 46 drawable.setTintMode(tintMode); 47 } 48 49} 50