use of io.hefuyi.listener.widget.DividerItemDecoration in project ListenerMusicPlayer by hefuyicoder.
the class SongsFragment method onViewCreated.
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ATE.apply(this, ATEUtil.getATEKey(getActivity()));
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
recyclerView.setAdapter(mAdapter);
recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST, true));
mPresenter.loadSongs(action);
if (Constants.NAVIGATE_PLAYLIST_FAVOURATE.equals(action)) {
subscribeFavourateSongEvent();
} else if (Constants.NAVIGATE_PLAYLIST_RECENTPLAY.equals(action)) {
subscribeRecentlyPlayEvent();
} else {
subscribeMediaUpdateEvent();
}
subscribeMetaChangedEvent();
}
use of io.hefuyi.listener.widget.DividerItemDecoration in project ListenerMusicPlayer by hefuyicoder.
the class AlbumFragment method setItemDecoration.
private void setItemDecoration() {
if (isGrid) {
int spacingInPixels = getActivity().getResources().getDimensionPixelSize(R.dimen.spacing_card_album_grid);
itemDecoration = new SpacesItemDecoration(spacingInPixels);
} else {
itemDecoration = new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST, true);
}
recyclerView.addItemDecoration(itemDecoration);
}
use of io.hefuyi.listener.widget.DividerItemDecoration in project ListenerMusicPlayer by hefuyicoder.
the class ArtistFragment method setItemDecoration.
private void setItemDecoration() {
if (isGrid) {
int spacingInPixels = getActivity().getResources().getDimensionPixelSize(R.dimen.spacing_card_album_grid);
itemDecoration = new SpacesItemDecoration(spacingInPixels);
} else {
itemDecoration = new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST, false);
}
recyclerView.addItemDecoration(itemDecoration);
}
use of io.hefuyi.listener.widget.DividerItemDecoration in project ListenerMusicPlayer by hefuyicoder.
the class AlbumDetailFragment method onViewCreated.
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ButterKnife.bind(this, view);
ATE.apply(this, ATEUtil.getATEKey(context));
if (getArguments().getBoolean("transition")) {
albumArt.setTransitionName(getArguments().getString("transition_name"));
}
recyclerView.setAdapter(mAdapter);
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST, false));
setupToolbar();
mPresenter.subscribe(albumID);
subscribeMetaChangedEvent();
}
use of io.hefuyi.listener.widget.DividerItemDecoration in project ListenerMusicPlayer by hefuyicoder.
the class FolderSongsFragment method onViewCreated.
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ATE.apply(this, ATEUtil.getATEKey(getActivity()));
if (Build.VERSION.SDK_INT < 21 && view.findViewById(R.id.status_bar) != null) {
view.findViewById(R.id.status_bar).setVisibility(View.GONE);
if (Build.VERSION.SDK_INT >= 19) {
int statusBarHeight = DensityUtil.getStatusBarHeight(getContext());
view.findViewById(R.id.toolbar).setPadding(0, statusBarHeight, 0, 0);
}
}
((AppCompatActivity) getActivity()).setSupportActionBar(toolbar);
final ActionBar ab = ((AppCompatActivity) getActivity()).getSupportActionBar();
ab.setDisplayHomeAsUpEnabled(true);
ab.setTitle(R.string.folders);
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
recyclerView.setAdapter(mAdapter);
recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST, true));
mPresenter.loadSongs(path);
subscribeMetaChangedEvent();
}
Aggregations