use of com.simplecity.multisheetview.ui.view.MultiSheetView in project Shuttle by timusus.
the class MiniPlayerFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.fragment_mini_player, container, false);
unbinder = ButterKnife.bind(this, rootView);
rootView.setOnClickListener(v -> {
MultiSheetView multiSheetView = MultiSheetView.getParentMultiSheetView(rootView);
if (multiSheetView != null) {
multiSheetView.expandSheet(MultiSheetView.Sheet.FIRST);
}
});
rootView.setOnTouchListener(new OnSwipeTouchListener(getActivity()));
playPauseView.setOnClickListener(v -> {
playPauseView.toggle();
playPauseView.postDelayed(() -> presenter.togglePlayback(), 200);
});
progressBar.setMax(1000);
disposable.add(Aesthetic.get(getContext()).colorPrimary().compose(distinctToMainThread()).subscribe(color -> {
boolean isDark = !Util.isColorLight(color);
trackName.setTextColor(isDark ? Color.WHITE : Color.BLACK);
artistName.setTextColor(isDark ? Color.WHITE : Color.BLACK);
ViewBackgroundAction.create(rootView).accept(color);
}, onErrorLogAndRethrow()));
return rootView;
}
Aggregations