180de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes/* 280de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes * Copyright (C) 2015 The Android Open Source Project 380de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes * 480de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes * Licensed under the Apache License, Version 2.0 (the "License"); 580de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes * you may not use this file except in compliance with the License. 680de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes * You may obtain a copy of the License at 780de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes * 880de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes * http://www.apache.org/licenses/LICENSE-2.0 980de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes * 1080de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes * Unless required by applicable law or agreed to in writing, software 1180de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes * distributed under the License is distributed on an "AS IS" BASIS, 1280de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1380de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes * See the License for the specific language governing permissions and 1480de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes * limitations under the License. 1580de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes */ 1680de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes 1780de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banespackage android.support.design.widget; 1880de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes 1916804c4a76276eb28fe9f4227461818003c32386Chris Banesimport android.graphics.Outline; 208f886fe8c7e23fe6ccb8734167c960c2ed3429c3Alan Viveretteimport android.support.annotation.RequiresApi; 2180de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes 2280de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes/** 238603357c9433b9aef1805413a3bfc4a4f8decc50Chris Banes * Lollipop version of {@link CircularBorderDrawable}. 2480de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes */ 258f886fe8c7e23fe6ccb8734167c960c2ed3429c3Alan Viverette@RequiresApi(21) 2680de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banesclass CircularBorderDrawableLollipop extends CircularBorderDrawable { 2780de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes 2816804c4a76276eb28fe9f4227461818003c32386Chris Banes @Override 2916804c4a76276eb28fe9f4227461818003c32386Chris Banes public void getOutline(Outline outline) { 3016804c4a76276eb28fe9f4227461818003c32386Chris Banes copyBounds(mRect); 3116804c4a76276eb28fe9f4227461818003c32386Chris Banes outline.setOval(mRect); 3216804c4a76276eb28fe9f4227461818003c32386Chris Banes } 3316804c4a76276eb28fe9f4227461818003c32386Chris Banes 3480de0674c28a2bd9ade11f24a3b0e46ea83b6847Chris Banes} 35