mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 09:43:15 +00:00
LayoutManager追加
This commit is contained in:
parent
a754198d75
commit
3f58c623f3
|
@ -4,6 +4,7 @@ import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.annotation.AnimatorRes;
|
import androidx.annotation.AnimatorRes;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
@ -62,11 +63,9 @@ public class DebugMenuLibraryItemListPageFragment extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
RecyclerView recyclerView = view.findViewById(R.id.item_recycler_view);
|
RecyclerView recyclerView = view.findViewById(R.id.item_recycler_view);
|
||||||
|
recyclerView.setAdapter(new ItemAdapter(libraryItemPage.getListItems()));
|
||||||
|
|
||||||
ArrayList<ListItem> listItems = libraryItemPage.getListItems();
|
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
|
|
||||||
ItemAdapter itemAdapter = new ItemAdapter(listItems);
|
|
||||||
recyclerView.setAdapter(itemAdapter);
|
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user