diff --git a/app/src/main/java/com/example/citrusclient/views/MainActivity.java b/app/src/main/java/com/example/citrusclient/views/MainActivity.java index ea3db46..4f26114 100644 --- a/app/src/main/java/com/example/citrusclient/views/MainActivity.java +++ b/app/src/main/java/com/example/citrusclient/views/MainActivity.java @@ -26,7 +26,6 @@ public class MainActivity extends AppCompatActivity { - BooksViewModel booksViewModel; Citrus citrus; @Override @@ -43,15 +42,7 @@ citrus = (Citrus) getApplication(); - booksViewModel = new ViewModelProvider(this).get(BooksViewModel.class); - booksViewModel.getBookLiveData().observe(this, new Observer>() { - @Override - public void onChanged(HashMap integerBookHashMap) { - citrus.setBook(new ArrayList<>(integerBookHashMap.values())); - } - }); - - showFragment(new MyBookshelfFragment()); +// showFragment(new HomeFragment()); setNavViewEvent(); @@ -66,6 +57,8 @@ private void setNavViewEvent(){ BottomNavigationView navView = findViewById(R.id.bottomNavigationView); + navView.setSelectedItemId(R.id.home); + showFragment(new HomeFragment()); navView.setOnItemSelectedListener(new NavigationBarView.OnItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {