10246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu/* 20246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * Copyright (C) 2014 The Android Open Source Project 30246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * 40246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 50246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * in compliance with the License. You may obtain a copy of the License at 60246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * 70246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * http://www.apache.org/licenses/LICENSE-2.0 80246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * 90246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * Unless required by applicable law or agreed to in writing, software distributed under the License 100246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 110246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * or implied. See the License for the specific language governing permissions and limitations under 120246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * the License. 130246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu */ 140246318f27a905a31df5a8af445cfe67d31dfb68Dake Gupackage android.support.v17.leanback.widget; 150246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu 160246318f27a905a31df5a8af445cfe67d31dfb68Dake Guimport android.support.v17.leanback.widget.ItemAlignmentFacet.ItemAlignmentDef; 170246318f27a905a31df5a8af445cfe67d31dfb68Dake Guimport android.support.v7.widget.RecyclerView; 180246318f27a905a31df5a8af445cfe67d31dfb68Dake Guimport android.view.View; 190246318f27a905a31df5a8af445cfe67d31dfb68Dake Guimport android.view.ViewGroup; 200246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu 210246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu/** 220246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * Interface for receiving notification when a child of this 230246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * ViewGroup has been selected. 240246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu */ 250246318f27a905a31df5a8af445cfe67d31dfb68Dake Gupublic abstract class OnChildViewHolderSelectedListener { 260246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu /** 270246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * Callback method to be invoked when a child of this ViewGroup has been 280246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * selected. 290246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * 300246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * @param parent The RecyclerView where the selection happened. 310246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * @param child The ViewHolder within the RecyclerView that is selected, or null if no 320246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * view is selected. 330246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * @param position The position of the view in the adapter, or NO_POSITION 340246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * if no view is selected. 350246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * @param subposition The index of which {@link ItemAlignmentDef} being used, 360246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu * 0 if there is no ItemAlignmentDef defined for the item. 370246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu */ 380246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu public void onChildViewHolderSelected(RecyclerView parent, RecyclerView.ViewHolder child, 390246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu int position, int subposition) { 400246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu } 410246318f27a905a31df5a8af445cfe67d31dfb68Dake Gu} 42