
Widoki RecyclerView i CardView
563
jesteś tutaj
...
public class PastaFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
RecyclerView pastaRecycler = (RecyclerView)inflater.inflate(
.........................., container, false);
String[] pastaNames = new String[Pasta.pastas.length];
for (int i = 0; i < pastaNames.length; i++) {
pastaNames[i] = Pasta.pastas[i].getName();
}
int[] pastaImages = new int[Pasta.pastas.length];
for (int i = 0; i < pastaImages.length; i++) {
pastaImages[i] = Pasta.pastas[i].getImageResourceId();
}
............................ adapter ...