use of com.github.anrimian.musicplayer.ui.common.toolbar.AdvancedToolbar in project music-player by Anrimian.
the class SettingsFragment method onViewCreated.
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
AdvancedToolbar toolbar = requireActivity().findViewById(R.id.toolbar);
navigation = FragmentNavigation.from(getParentFragmentManager());
viewBinding.tvDisplay.setOnClickListener(v -> navigation.addNewFragment(new DisplaySettingsFragment()));
viewBinding.tvLibrary.setOnClickListener(v -> navigation.addNewFragment(new LibrarySettingsFragment()));
viewBinding.tvPlayer.setOnClickListener(v -> navigation.addNewFragment(new PlayerSettingsFragment()));
viewBinding.tvTheme.setOnClickListener(v -> navigation.addNewFragment(new ThemeSettingsFragment()));
viewBinding.tvHeadset.setOnClickListener(v -> navigation.addNewFragment(new HeadsetSettingsFragment()));
viewBinding.llRunRescanStorage.setOnClickListener(v -> onRescanStorageButtonClicked());
SlidrPanel.simpleSwipeBack(viewBinding.flContainer, this, toolbar::onStackFragmentSlided);
}
use of com.github.anrimian.musicplayer.ui.common.toolbar.AdvancedToolbar in project music-player by Anrimian.
the class ExcludedFoldersFragment method onViewCreated.
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
AdvancedToolbar toolbar = requireActivity().findViewById(R.id.toolbar);
toolbar.setTitle(R.string.excluded_folders);
toolbar.setSubtitle(null);
toolbar.setTitleClickListener(null);
adapter = new ExcludedFolderAdapter(recyclerView, presenter::onDeleteFolderClicked);
recyclerView.setAdapter(adapter);
recyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
SlidrPanel.simpleSwipeBack(clContainer, this, toolbar::onStackFragmentSlided);
}
use of com.github.anrimian.musicplayer.ui.common.toolbar.AdvancedToolbar in project music-player by Anrimian.
the class LibraryFoldersRootFragment method onFragmentMovedOnTop.
@Override
public void onFragmentMovedOnTop() {
super.onFragmentMovedOnTop();
AdvancedToolbar toolbar = requireActivity().findViewById(R.id.toolbar);
toolbar.setSubtitle(R.string.folders);
FragmentNavigation folderNavigation = FragmentNavigation.from(getChildFragmentManager());
if (folderNavigation.isInitialized()) {
folderNavigation.dispatchMovedToTop();
}
}
use of com.github.anrimian.musicplayer.ui.common.toolbar.AdvancedToolbar in project music-player by Anrimian.
the class ExcludedFoldersFragment method onFragmentMovedOnTop.
@Override
public void onFragmentMovedOnTop() {
AdvancedToolbar toolbar = requireActivity().findViewById(R.id.toolbar);
toolbar.clearOptionsMenu();
}
use of com.github.anrimian.musicplayer.ui.common.toolbar.AdvancedToolbar in project music-player by Anrimian.
the class HeadsetSettingsFragment method onViewCreated.
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
AdvancedToolbar toolbar = requireActivity().findViewById(R.id.toolbar);
toolbar.setTitle(R.string.settings);
toolbar.setSubtitle(R.string.headset);
toolbar.setTitleClickListener(null);
rxPermissions = new RxPermissions(requireActivity());
SlidrPanel.simpleSwipeBack(viewBinding.clContainer, this, toolbar::onStackFragmentSlided);
onCheckChanged(viewBinding.cbPlayOnConnect, this::onPlayOnConnectChecked);
setChecked(viewBinding.cbPlayOnConnect, BluetoothConnectionReceiver.isEnabled(requireContext()));
}
Aggregations