Search in sources :

Example 1 with DividerItemDecoration

use of com.wm.remusic.widget.DividerItemDecoration in project remusic by aa112901.

the class AlbumDetailFragment method onCreateView.

public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_common, container, false);
    recyclerView = (RecyclerView) view.findViewById(R.id.recyclerview);
    layoutManager = new LinearLayoutManager(mContext);
    recyclerView.setLayoutManager(layoutManager);
    mAdapter = new AlbumDetailAdapter(null);
    recyclerView.setAdapter(mAdapter);
    itemDecoration = new DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL_LIST);
    recyclerView.addItemDecoration(itemDecoration);
    recyclerView.setHasFixedSize(true);
    reloadAdapter();
    AlbumInfo albumInfo = MusicUtils.getAlbumInfo(mContext, albumID);
    Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
    toolbar.setPadding(0, CommonUtils.getStatusHeight(mContext), 0, 0);
    ((AppCompatActivity) mContext).setSupportActionBar(toolbar);
    ab = ((AppCompatActivity) mContext).getSupportActionBar();
    ab.setHomeAsUpIndicator(R.drawable.actionbar_back);
    ab.setDisplayHomeAsUpEnabled(true);
    ab.setTitle(albumInfo.album_name);
    toolbar.setNavigationOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            if (getActivity() != null)
                getActivity().onBackPressed();
        }
    });
    return view;
}
Also used : AlbumInfo(com.wm.remusic.info.AlbumInfo) AppCompatActivity(android.support.v7.app.AppCompatActivity) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(com.wm.remusic.widget.DividerItemDecoration) ImageView(android.widget.ImageView) TintImageView(com.bilibili.magicasakura.widgets.TintImageView) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView) Toolbar(android.support.v7.widget.Toolbar)

Example 2 with DividerItemDecoration

use of com.wm.remusic.widget.DividerItemDecoration in project remusic by aa112901.

the class RadioDetailActivity method setList.

private void setList() {
    recyclerView = (ObservableRecyclerView) findViewById(R.id.recyclerview);
    recyclerView.setScrollViewCallbacks(RadioDetailActivity.this);
    recyclerView.setLayoutManager(new LinearLayoutManager(RadioDetailActivity.this));
    recyclerView.setHasFixedSize(false);
    mAdapter = new PlaylistDetailAdapter(RadioDetailActivity.this, adapterList);
    recyclerView.setAdapter(mAdapter);
    recyclerView.addItemDecoration(new DividerItemDecoration(RadioDetailActivity.this, DividerItemDecoration.VERTICAL_LIST));
}
Also used : LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(com.wm.remusic.widget.DividerItemDecoration)

Example 3 with DividerItemDecoration

use of com.wm.remusic.widget.DividerItemDecoration in project remusic by aa112901.

the class SearchMusicFragment method onCreateView.

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.recylerview, container, false);
    if (getArguments() != null) {
        songInfos = getArguments().getParcelableArrayList("searchMusic");
    }
    recyclerView = (RecyclerView) view.findViewById(R.id.recyclerview);
    layoutManager = new LinearLayoutManager(mContext);
    recyclerView.setLayoutManager(layoutManager);
    mAdapter = new MusicAdapter(songInfos);
    recyclerView.setAdapter(mAdapter);
    recyclerView.setHasFixedSize(true);
    recyclerView.addItemDecoration(new DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL_LIST));
    return view;
}
Also used : LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(com.wm.remusic.widget.DividerItemDecoration) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView) Nullable(android.support.annotation.Nullable)

Example 4 with DividerItemDecoration

use of com.wm.remusic.widget.DividerItemDecoration in project remusic by aa112901.

the class FolderFragment method setItemDecoration.

// 设置分割线
private void setItemDecoration() {
    itemDecoration = new DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL_LIST);
    recyclerView.addItemDecoration(itemDecoration);
}
Also used : DividerItemDecoration(com.wm.remusic.widget.DividerItemDecoration)

Example 5 with DividerItemDecoration

use of com.wm.remusic.widget.DividerItemDecoration in project remusic by aa112901.

the class RankPlaylistActivity method setList.

private void setList() {
    recyclerView = (ObservableRecyclerView) findViewById(R.id.recyclerview);
    recyclerView.setScrollViewCallbacks(RankPlaylistActivity.this);
    recyclerView.setLayoutManager(new LinearLayoutManager(RankPlaylistActivity.this));
    recyclerView.setHasFixedSize(true);
    mAdapter = new PlaylistDetailAdapter(RankPlaylistActivity.this, adapterList);
    recyclerView.setAdapter(mAdapter);
    recyclerView.addItemDecoration(new DividerItemDecoration(RankPlaylistActivity.this, DividerItemDecoration.VERTICAL_LIST));
}
Also used : LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(com.wm.remusic.widget.DividerItemDecoration)

Aggregations

DividerItemDecoration (com.wm.remusic.widget.DividerItemDecoration)14 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)9 RecyclerView (android.support.v7.widget.RecyclerView)4 View (android.view.View)4 ImageView (android.widget.ImageView)3 TextView (android.widget.TextView)3 Paint (android.graphics.Paint)1 Nullable (android.support.annotation.Nullable)1 SwipeRefreshLayout (android.support.v4.widget.SwipeRefreshLayout)1 AppCompatActivity (android.support.v7.app.AppCompatActivity)1 SimpleItemAnimator (android.support.v7.widget.SimpleItemAnimator)1 Toolbar (android.support.v7.widget.Toolbar)1 TintImageView (com.bilibili.magicasakura.widgets.TintImageView)1 MainFragmentAdapter (com.wm.remusic.adapter.MainFragmentAdapter)1 AlbumInfo (com.wm.remusic.info.AlbumInfo)1 DragSortRecycler (com.wm.remusic.widget.DragSortRecycler)1 SideBar (com.wm.remusic.widget.SideBar)1 ArrayList (java.util.ArrayList)1