I am developing an Android TV application and showing the items on the list. When I scroll the list focus moving from the current item to the next, I want the keep focus constantly on the first item and scroll the whole list from the same selected item position. Like, this implementation of Hotstar. Currently, I am using Android ListRow with the following code.
AssetCardPresenter assetCardPresenter = new AssetCardPresenter(getActivity());
MdsCompletedRecordingAdapter cardRowAdapter = new MdsCompletedRecordingAdapter(getActivity(), assetCardPresenter, 10);
Map<String, MdsCompletedRecord> completedRecordingMap = getMdsCompletedRecordingProgramsMap(completedRecordedProgramList);
HeaderItem headerItem = new HeaderItem(SCHEDULED_PROGRAM_HEADER_ID, COMPLETED_HEADER_NAME);
ArrayList<MdsCompletedRecord> arrayList = new ArrayList<>(completedRecordingMap.values());
Collections.reverse(arrayList);
cardRowAdapter.addAllItems(arrayList);
ListRow row = new ListRow(headerItem, cardRowAdapter);
mRowAdapter.add(row);
You can do this easily by using HorizontalGridView from Leanback and set these parameters to force the focus on the left of the screen