Search in sources :

Example 1 with BaseVideoItem

use of com.volokh.danylo.videolist.video_list_demo.adapter.items.BaseVideoItem in project VideoPlayerManager by danylovolokh.

the class VideoRecyclerViewAdapter method onBindViewHolder.

@Override
public void onBindViewHolder(VideoViewHolder viewHolder, int position) {
    BaseVideoItem videoItem = mList.get(position);
    videoItem.update(position, viewHolder, mVideoPlayerManager);
}
Also used : BaseVideoItem(com.volokh.danylo.videolist.video_list_demo.adapter.items.BaseVideoItem)

Example 2 with BaseVideoItem

use of com.volokh.danylo.videolist.video_list_demo.adapter.items.BaseVideoItem in project VideoPlayerManager by danylovolokh.

the class VideoListViewAdapter method getView.

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    BaseVideoItem videoItem = mList.get(position);
    View resultView;
    if (convertView == null) {
        resultView = videoItem.createView(parent, mContext.getResources().getDisplayMetrics().widthPixels);
    } else {
        resultView = convertView;
    }
    videoItem.update(position, (VideoViewHolder) resultView.getTag(), mVideoPlayerManager);
    return resultView;
}
Also used : BaseVideoItem(com.volokh.danylo.videolist.video_list_demo.adapter.items.BaseVideoItem) View(android.view.View)

Example 3 with BaseVideoItem

use of com.volokh.danylo.videolist.video_list_demo.adapter.items.BaseVideoItem in project VideoPlayerManager by danylovolokh.

the class VideoRecyclerViewAdapter method onCreateViewHolder.

@Override
public VideoViewHolder onCreateViewHolder(ViewGroup viewGroup, int position) {
    BaseVideoItem videoItem = mList.get(position);
    View resultView = videoItem.createView(viewGroup, mContext.getResources().getDisplayMetrics().widthPixels);
    return new VideoViewHolder(resultView);
}
Also used : BaseVideoItem(com.volokh.danylo.videolist.video_list_demo.adapter.items.BaseVideoItem) RecyclerView(android.support.v7.widget.RecyclerView) View(android.view.View) VideoViewHolder(com.volokh.danylo.videolist.video_list_demo.adapter.holders.VideoViewHolder)

Aggregations

BaseVideoItem (com.volokh.danylo.videolist.video_list_demo.adapter.items.BaseVideoItem)3 View (android.view.View)2 RecyclerView (android.support.v7.widget.RecyclerView)1 VideoViewHolder (com.volokh.danylo.videolist.video_list_demo.adapter.holders.VideoViewHolder)1