라이브러리 SectionedRecyclerViewAdapter을 사용하여 데이터를 섹션으로 그룹화 할 수 있습니다.
// Create an instance of SectionedRecyclerViewAdapter
SectionedRecyclerViewAdapter sectionAdapter = new SectionedRecyclerViewAdapter();
// Create your sections with the list of data for each year
MySection section1 = new MySection("Feature", firstDataList);
MySection section2 = new MySection("Normal", secondDataList);
// Add your Sections to the adapter
sectionAdapter.addSection(section1);
sectionAdapter.addSection(section2);
// Set up your RecyclerView with the SectionedRecyclerViewAdapter
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerview);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
recyclerView.setAdapter(sectionAdapter);
내가 혼동 말해하고
할 구체적인 세부 사항이 –
당신이 필요로 imlement하는 방법의 자세한 사항 : 당신이 당신의 섹션과 RecyclerView을 설정 그리고
:
먼저 제 클래스를 생성 ? github 페이지의 가이드를 따르려고 했습니까? – Gustavo
나는 따라하지만 내 요구 사항에 accroding 변환 할 수 없습니다. –