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 package android.support.v7.widget; 17 18 import android.content.Context; 19 import android.content.res.ColorStateList; 20 import android.support.annotation.Nullable; 21 22 /** 23 * Interface for platform specific CardView implementations. 24 */ 25 interface CardViewImpl { initialize(CardViewDelegate cardView, Context context, ColorStateList backgroundColor, float radius, float elevation, float maxElevation)26 void initialize(CardViewDelegate cardView, Context context, ColorStateList backgroundColor, 27 float radius, float elevation, float maxElevation); 28 setRadius(CardViewDelegate cardView, float radius)29 void setRadius(CardViewDelegate cardView, float radius); 30 getRadius(CardViewDelegate cardView)31 float getRadius(CardViewDelegate cardView); 32 setElevation(CardViewDelegate cardView, float elevation)33 void setElevation(CardViewDelegate cardView, float elevation); 34 getElevation(CardViewDelegate cardView)35 float getElevation(CardViewDelegate cardView); 36 initStatic()37 void initStatic(); 38 setMaxElevation(CardViewDelegate cardView, float maxElevation)39 void setMaxElevation(CardViewDelegate cardView, float maxElevation); 40 getMaxElevation(CardViewDelegate cardView)41 float getMaxElevation(CardViewDelegate cardView); 42 getMinWidth(CardViewDelegate cardView)43 float getMinWidth(CardViewDelegate cardView); 44 getMinHeight(CardViewDelegate cardView)45 float getMinHeight(CardViewDelegate cardView); 46 updatePadding(CardViewDelegate cardView)47 void updatePadding(CardViewDelegate cardView); 48 onCompatPaddingChanged(CardViewDelegate cardView)49 void onCompatPaddingChanged(CardViewDelegate cardView); 50 onPreventCornerOverlapChanged(CardViewDelegate cardView)51 void onPreventCornerOverlapChanged(CardViewDelegate cardView); 52 setBackgroundColor(CardViewDelegate cardView, @Nullable ColorStateList color)53 void setBackgroundColor(CardViewDelegate cardView, @Nullable ColorStateList color); 54 getBackgroundColor(CardViewDelegate cardView)55 ColorStateList getBackgroundColor(CardViewDelegate cardView); 56 } 57