パッケージで使用HorizontalGridViewしています。android.support.v17.leanback.widget問題は、OnChildViewHolderSelectedListener呼び出されるのが早すぎることです。
horizontalGrid.setSelectedPosition(position);
horizontalGrid.setOnChildViewHolderSelectedListener(new OnChildViewHolderSelectedListener() {
@Override
public void onChildViewHolderSelected(RecyclerView parent, RecyclerView.ViewHolder child, int position, int subposition) {
super.onChildViewHolderSelected(parent, child, position, subposition);
//the animation isn't complete
//horizontalGrid.getLayoutManager().isSmoothScrolling() is true;
}
});
私が認識している唯一の選択肢は、TimerTaskwithを使用してis falseTimerかどうかを確認することです。horizontalGrid.getLayoutManager().isSmoothScrolling()信頼性の低い別の解決策は、HandlerwithpostDelayedメソッドを使用することです。私の場合、どちらの方法も醜いです。組み込みメソッドは見つかりませんでした。何か不足していますか?もっとエレガントなものはありますか?