164f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov/* 264f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov * Copyright (C) 2017 The Android Open Source Project 364f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov * 464f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov * Licensed under the Apache License, Version 2.0 (the "License"); 564f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov * you may not use this file except in compliance with the License. 664f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov * You may obtain a copy of the License at 764f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov * 864f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov * http://www.apache.org/licenses/LICENSE-2.0 964f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov * 1064f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov * Unless required by applicable law or agreed to in writing, software 1164f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov * distributed under the License is distributed on an "AS IS" BASIS, 1264f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1364f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov * See the License for the specific language governing permissions and 1464f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov * limitations under the License. 1564f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov */ 1664f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov 1764f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikovpackage android.support.v7.app; 1864f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov 1964f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikovimport android.content.Context; 2064f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikovimport android.support.annotation.Nullable; 2164f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikovimport android.support.v7.view.CollapsibleActionView; 2264f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikovimport android.util.AttributeSet; 2364f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikovimport android.view.View; 2464f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov 2564f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikovpublic class CustomCollapsibleView extends View implements CollapsibleActionView { 2664f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov public CustomCollapsibleView(Context context) { 2764f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov this(context, null, 0); 2864f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov } 2964f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov 3064f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov public CustomCollapsibleView(Context context, 3164f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov @Nullable AttributeSet attrs) { 3264f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov this(context, attrs, 0); 3364f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov } 3464f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov 3564f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov public CustomCollapsibleView(Context context, 3664f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov @Nullable AttributeSet attrs, int defStyleAttr) { 3764f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov super(context, attrs, defStyleAttr); 3864f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov setBackgroundColor(0xFFFF0000); 3964f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov } 4064f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov 4164f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov @Override 4264f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov public void onActionViewExpanded() { 4364f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov } 4464f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov 4564f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov @Override 4664f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov public void onActionViewCollapsed() { 4764f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov } 4864f86e807495e93f13f838a2fa9c50037b678319Kirill Grouchnikov} 49