diff --git a/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/home/HomeFragment.java b/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/home/HomeFragment.java index 6192d75..78f985b 100644 --- a/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/home/HomeFragment.java +++ b/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/home/HomeFragment.java @@ -63,22 +63,21 @@ Integer uid = 1; String token = "abc0"; - ListView listView = (ListView) getActivity().findViewById(R.id.animationView); + ListView listView = (ListView) getActivity().findViewById(R.id.animation_view); homeViewModel.updateGallery(); - BaseAdapter adapter = new ListAnimationViewAdapter(getActivity(), R.layout.animation_home); - listView.setAdapter(adapter); - homeViewModel.getAnimationJson().observe(getViewLifecycleOwner(), new Observer>() { @Override public void onChanged(Collection animationJsons) { Collection animationJsonList = homeViewModel.getGallery(); -// BaseAdapter adapter = new ListAnimationViewAdapter(getActivity(), R.layout.animation_home, animationJsonList); -// listView.setAdapter(adapter); + BaseAdapter adapter = new ListAnimationViewAdapter(getActivity(), R.layout.animation_home, animationJsonList); + listView.setAdapter(adapter); } }); + homeViewModel.updateGallery(); + } public void onCreateAnimationView(Animation animation){