Search in sources :

Example 1 with UpNextView

use of com.simplecity.amp_library.ui.views.UpNextView in project Shuttle by timusus.

the class MainController method onCreateView.

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_main, container, false);
    ButterKnife.bind(this, rootView);
    ShuttleApplication.getInstance().getAppComponent().inject(this);
    if (savedInstanceState == null) {
        getChildFragmentManager().beginTransaction().add(multiSheetView.getSheetContainerViewResId(MultiSheetView.Sheet.FIRST), PlayerFragment.newInstance()).add(multiSheetView.getSheetPeekViewResId(MultiSheetView.Sheet.FIRST), MiniPlayerFragment.newInstance()).add(multiSheetView.getSheetContainerViewResId(MultiSheetView.Sheet.SECOND), QueueFragment.newInstance()).commit();
    } else {
        multiSheetView.restoreSheet(savedInstanceState.getInt(STATE_CURRENT_SHEET));
    }
    ((ViewGroup) multiSheetView.findViewById(multiSheetView.getSheetPeekViewResId(MultiSheetView.Sheet.SECOND))).addView(new UpNextView(getContext()));
    toggleBottomSheetVisibility(false, false);
    return rootView;
}
Also used : ViewGroup(android.view.ViewGroup) UpNextView(com.simplecity.amp_library.ui.views.UpNextView) BindView(butterknife.BindView) View(android.view.View) CustomMultiSheetView(com.simplecity.amp_library.ui.views.multisheet.CustomMultiSheetView) UpNextView(com.simplecity.amp_library.ui.views.UpNextView) MultiSheetView(com.simplecity.multisheetview.ui.view.MultiSheetView) Nullable(android.support.annotation.Nullable)

Aggregations

Nullable (android.support.annotation.Nullable)1 View (android.view.View)1 ViewGroup (android.view.ViewGroup)1 BindView (butterknife.BindView)1 UpNextView (com.simplecity.amp_library.ui.views.UpNextView)1 CustomMultiSheetView (com.simplecity.amp_library.ui.views.multisheet.CustomMultiSheetView)1 MultiSheetView (com.simplecity.multisheetview.ui.view.MultiSheetView)1