From ad3a600e8cc8a9ae8d72ebf710dc7de4a93d3341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Mon, 22 Jan 2024 11:03:44 +0900 Subject: [PATCH] =?UTF-8?q?ToolBar=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feature/library/LibraryTopFragment.java | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryTopFragment.java b/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryTopFragment.java index 27ebea25..5ac527f8 100644 --- a/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryTopFragment.java +++ b/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryTopFragment.java @@ -94,31 +94,5 @@ public class LibraryTopFragment extends Fragment { listItemAdapter.notifyItemRangeInserted(0, libraryItemPage.getListItems().size() - 1); }); }); - - CollapsingToolbarLayout collapsingToolbarLayout = view.findViewById(R.id.collapsing_toolbar); - Toolbar toolbar = view.findViewById(R.id.toolbar); - - // Set the Toolbar - ((AppCompatActivity)getActivity()).setSupportActionBar(toolbar); - - // Set the title of the CollapsingToolbarLayout - collapsingToolbarLayout.setTitle("Library"); - - AppBarLayout appBarLayout = view.findViewById(R.id.app_bar_layout); - appBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() { - @Override - public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) { - if (Math.abs(verticalOffset) == appBarLayout.getTotalScrollRange()) { - // Collapsed - getActivity().getWindow().setStatusBarColor(ContextCompat.getColor(getActivity(), one.nem.lacerta.shared.ui.R.color.colorSecondaryContainer)); - } else if (verticalOffset == 0) { - // Expanded - getActivity().getWindow().setStatusBarColor(ContextCompat.getColor(getActivity(), one.nem.lacerta.shared.ui.R.color.colorSurface)); - } else { - // Somewhere in between - // Here you can add a color transition if you want - } - } - }); } }