mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
改善したもののやっぱり実行するとアプリが落ちる
This commit is contained in:
1 parent
aaf4264f44
commit
3bf14799b5
1 file changed
+2
-2
+2
-2
@@ -66,7 +66,7 @@ public class LibraryTopFragment extends Fragment {
|
||||
// Inflate the layout for this fragment
|
||||
View view = inflater.inflate(R.layout.fragment_library_top, container, false);
|
||||
|
||||
// Use view.findViewById instead of findViewById
|
||||
// Use view.findViewById instead of findViewById
|
||||
ListView documentListView = view.findViewById(R.id.document_list);
|
||||
List<String> documentList = new ArrayList<>();
|
||||
|
||||
@@ -76,7 +76,7 @@ public class LibraryTopFragment extends Fragment {
|
||||
|
||||
// レイアウトリソースを指定する(例: simple_list_item_1)
|
||||
ArrayAdapter<String> adapter = new ArrayAdapter<>(
|
||||
requireActivity(), // 使用するActivityに依存する場合は requireActivity() を使う
|
||||
getActivity(), // 修正: requireActivity() ではなく getActivity() を使用
|
||||
android.R.layout.simple_list_item_1,
|
||||
documentList);
|
||||
|
||||
|
||||
Reference in new issue
Block a user