1 /* 2 * Copyright (C) 2015 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 17 package com.android.tv.menu; 18 19 import android.content.Context; 20 import android.util.AttributeSet; 21 22 import com.android.tv.R; 23 import com.android.tv.data.Channel; 24 25 /** 26 * A view to render a guide card. 27 */ 28 public class SetupCardView extends BaseCardView<Channel> { 29 private static final String TAG = "GuideCardView"; 30 private static final boolean DEBUG = false; 31 32 private static final int INVALID_COUNT = -1; 33 34 private final float mCardHeight; 35 36 public SetupCardView(Context context) { 37 this(context, null, 0); 38 } 39 40 public SetupCardView(Context context, AttributeSet attrs) { 41 this(context, attrs, 0); 42 } 43 44 public SetupCardView(Context context, AttributeSet attrs, int defStyle) { 45 super(context, attrs, defStyle); 46 mCardHeight = getResources().getDimension(R.dimen.card_layout_height); 47 } 48 49 @Override 50 protected float getCardHeight() { 51 return mCardHeight; 52 } 53 } 54