19106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn/*
29106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * Copyright (C) 2014 The Android Open Source Project
39106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn *
49106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
59106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * in compliance with the License. You may obtain a copy of the License at
69106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn *
79106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * http://www.apache.org/licenses/LICENSE-2.0
89106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn *
99106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * Unless required by applicable law or agreed to in writing, software distributed under the License
109106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
119106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * or implied. See the License for the specific language governing permissions and limitations under
129106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * the License.
139106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn */
149106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbournpackage android.support.v17.leanback.widget;
159106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn
169106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbournimport android.view.View;
179106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbournimport android.view.ViewGroup;
189106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn
199106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn/**
209106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * Interface definition for a callback to be invoked when a child of this
219106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * viewgroup has been selected.
229106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn */
239106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbournpublic interface OnChildSelectedListener {
249106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn    /**
259106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn     * Callback method to be invoked when a child of this viewgroup has been
269106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn     * selected.
279106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn     *
289106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn     * <p>This method may be called during layout, so implementations of this
299106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn     * interface need to be careful not to ... (todo).
309106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn     *
319106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn     * @param parent The ViewGroup where the selection happened.
329106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn     * @param view The view within the ViewGroup that is selected, or null if no
339106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn     *        view is selected.
349106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn     * @param position The position of the view in the adapter, or NO_POSITION
359106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn     *        if no view is selected.
369106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn     * @param id The id of the child that is selected, or NO_ID if no view is
379106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn     *        selected.
389106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn     */
399106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn    void onChildSelected(ViewGroup parent, View view, int position, long id);
409106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn}
41