Search in sources :

Example 1 with UnLimit91Adapter

use of com.dante.adapter.UnLimit91Adapter in project 91Pop by DanteAndroid.

the class VideoListFragment method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ArrayList<UnLimit91PornItem> mUnLimit91PornItemList = new ArrayList<>();
    mUnLimit91Adapter = new UnLimit91Adapter(R.layout.item_unlimit_91porn, mUnLimit91PornItemList);
    skipPageAdapter = new SkipPageAdapter(R.layout.item_skip_page);
}
Also used : ArrayList(java.util.ArrayList) UnLimit91Adapter(com.dante.adapter.UnLimit91Adapter) SkipPageAdapter(com.dante.adapter.SkipPageAdapter) UnLimit91PornItem(com.dante.data.model.UnLimit91PornItem)

Example 2 with UnLimit91Adapter

use of com.dante.adapter.UnLimit91Adapter in project 91Pop by DanteAndroid.

the class SearchActivity method init.

private void init() {
    initToolBar(toolbar);
    searchView.setQueryHint("搜索视频");
    searchView.onActionViewExpanded();
    List<String> datasetSortBy = new LinkedList<>(Arrays.asList(getResources().getStringArray(R.array.sort_by)));
    niceSpinnerSortBy.attachDataSource(datasetSortBy);
    List<String> datasetSearch = new LinkedList<>(Arrays.asList(getResources().getStringArray(R.array.search)));
    niceSpinnerSearch.attachDataSource(datasetSearch);
    List<UnLimit91PornItem> mUnLimit91PornItemList = new ArrayList<>();
    mUnLimit91Adapter = new UnLimit91Adapter(R.layout.item_unlimit_91porn, mUnLimit91PornItemList);
    mUnLimit91Adapter.openLoadAnimation();
    recyclerView.setLayoutManager(new LinearLayoutManager(this));
    recyclerView.setAdapter(mUnLimit91Adapter);
    mUnLimit91Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {

        @Override
        public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
            UnLimit91PornItem unLimit91PornItems = (UnLimit91PornItem) adapter.getData().get(position);
            goToPlayVideo(unLimit91PornItems);
        }
    });
    mUnLimit91Adapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {

        @Override
        public void onLoadMoreRequested() {
            presenter.searchVideos(searchId, sort, false);
        }
    }, recyclerView);
    helper = new LoadViewHelper(recyclerView);
    helper.setListener(new OnLoadViewListener() {

        @Override
        public void onRetryClick() {
            presenter.searchVideos(searchId, sort, false);
        }
    });
}
Also used : ArrayList(java.util.ArrayList) UnLimit91Adapter(com.dante.adapter.UnLimit91Adapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) BindView(butterknife.BindView) View(android.view.View) AdapterView(android.widget.AdapterView) RecyclerView(android.support.v7.widget.RecyclerView) LinkedList(java.util.LinkedList) BaseQuickAdapter(com.chad.library.adapter.base.BaseQuickAdapter) OnLoadViewListener(com.helper.loadviewhelper.help.OnLoadViewListener) LoadViewHelper(com.helper.loadviewhelper.load.LoadViewHelper) UnLimit91PornItem(com.dante.data.model.UnLimit91PornItem)

Example 3 with UnLimit91Adapter

use of com.dante.adapter.UnLimit91Adapter in project 91Pop by DanteAndroid.

the class AuthorActivity method init.

private void init() {
    swipeLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {

        @Override
        public void onRefresh() {
            presenter.authorVideos(uid, true);
        }
    });
    swipeLayout.setEnabled(false);
    List<UnLimit91PornItem> mUnLimit91PornItemList = new ArrayList<>();
    mUnLimit91Adapter = new UnLimit91Adapter(R.layout.item_unlimit_91porn, mUnLimit91PornItemList);
    recyclerView.setLayoutManager(new LinearLayoutManager(this));
    recyclerView.setAdapter(mUnLimit91Adapter);
    mUnLimit91Adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {

        @Override
        public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
            UnLimit91PornItem unLimit91PornItems = (UnLimit91PornItem) adapter.getData().get(position);
            Intent intent = new Intent();
            intent.putExtra(Keys.KEY_INTENT_UNLIMIT91PORNITEM, unLimit91PornItems);
            setResult(AUTHORACTIVITY_RESULT_CODE, intent);
            onBackPressed();
        }
    });
    mUnLimit91Adapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {

        @Override
        public void onLoadMoreRequested() {
            presenter.authorVideos(uid, false);
        }
    }, recyclerView);
    helper = new LoadViewHelper(recyclerView);
    helper.setListener(new OnLoadViewListener() {

        @Override
        public void onRetryClick() {
            swipeLayout.setEnabled(false);
            presenter.authorVideos(uid, true);
        }
    });
    presenter.authorVideos(uid, false);
}
Also used : ArrayList(java.util.ArrayList) UnLimit91Adapter(com.dante.adapter.UnLimit91Adapter) Intent(android.content.Intent) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) SwipeRefreshLayout(android.support.v4.widget.SwipeRefreshLayout) BindView(butterknife.BindView) RecyclerView(android.support.v7.widget.RecyclerView) View(android.view.View) BaseQuickAdapter(com.chad.library.adapter.base.BaseQuickAdapter) OnLoadViewListener(com.helper.loadviewhelper.help.OnLoadViewListener) LoadViewHelper(com.helper.loadviewhelper.load.LoadViewHelper) UnLimit91PornItem(com.dante.data.model.UnLimit91PornItem)

Example 4 with UnLimit91Adapter

use of com.dante.adapter.UnLimit91Adapter in project 91Pop by DanteAndroid.

the class IndexFragment method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mUnLimit91PornItemList = new ArrayList<>();
    mUnLimit91Adapter = new UnLimit91Adapter(R.layout.item_unlimit_91porn, mUnLimit91PornItemList);
}
Also used : UnLimit91Adapter(com.dante.adapter.UnLimit91Adapter)

Aggregations

UnLimit91Adapter (com.dante.adapter.UnLimit91Adapter)4 UnLimit91PornItem (com.dante.data.model.UnLimit91PornItem)3 ArrayList (java.util.ArrayList)3 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)2 RecyclerView (android.support.v7.widget.RecyclerView)2 View (android.view.View)2 BindView (butterknife.BindView)2 BaseQuickAdapter (com.chad.library.adapter.base.BaseQuickAdapter)2 OnLoadViewListener (com.helper.loadviewhelper.help.OnLoadViewListener)2 LoadViewHelper (com.helper.loadviewhelper.load.LoadViewHelper)2 Intent (android.content.Intent)1 SwipeRefreshLayout (android.support.v4.widget.SwipeRefreshLayout)1 AdapterView (android.widget.AdapterView)1 SkipPageAdapter (com.dante.adapter.SkipPageAdapter)1 LinkedList (java.util.LinkedList)1