当前位置: 首页>>代码示例>>Java>>正文


Java PullToRefreshGridView.setOnLastItemVisibleListener方法代码示例

本文整理汇总了Java中com.handmark.pulltorefresh.library.PullToRefreshGridView.setOnLastItemVisibleListener方法的典型用法代码示例。如果您正苦于以下问题:Java PullToRefreshGridView.setOnLastItemVisibleListener方法的具体用法?Java PullToRefreshGridView.setOnLastItemVisibleListener怎么用?Java PullToRefreshGridView.setOnLastItemVisibleListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.handmark.pulltorefresh.library.PullToRefreshGridView的用法示例。


在下文中一共展示了PullToRefreshGridView.setOnLastItemVisibleListener方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreateView

import com.handmark.pulltorefresh.library.PullToRefreshGridView; //导入方法依赖的package包/类
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    mChannelList = (PullToRefreshGridView) inflater.inflate(R.layout.fragment_live,
            container,
            false);
    //        mChannelList = (PullToRefreshGridView) view.findViewById(R.id.channel_list);
    mChannelList.setMode(Mode.DISABLED);

    mChannelList.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {

        @Override
        public void onLastItemVisible() {
            if (mHasMore) {
                getNextPage();
            }
        }
    });

    mChannelList.setOnItemClickListener(new OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> parent, View view,
                int position, long id) {
            // TODO Auto-generated method stub
            //                Intent intent;
            //                intent = new Intent(getActivity(), VideoDetailPages.class);
            //                intent.putExtra("gameurl", "rtmp://192.168.41.234/live/hello");
            //                startActivity(intent);
        }

    });

    mAdapter = new LiveChannelAdapter();
    mChannelList.setAdapter(mAdapter);

    getNextPage();

    Log.d(TAG, "FragmentLive: onCreateView");
    return mChannelList;
}
 
开发者ID:jiangerji,项目名称:danmaku-project,代码行数:40,代码来源:FragmentLive.java

示例2: onCreate

import com.handmark.pulltorefresh.library.PullToRefreshGridView; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle bundle) {
    super.onCreate(bundle);

    Intent intent = getIntent();
    mGameId = intent.getIntExtra(GAME_ID, 0);

    if (mGameId == 0) {
        finish();
        return;
    }

    setContentView(R.layout.fragment_live);

    mGameName = intent.getStringExtra(GAME_NAME);

    setTitle(getResources().getString(R.string.live_channel_title,
            mGameName));

    Log.d(TAG, "live channel: game id=" + mGameId);
    Log.d(TAG, "live channel: game name=" + mGameName);

    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);

    mAdapter = new LiveChannelAdapter();
    mLiveChannels = (PullToRefreshGridView) findViewById(R.id.channel_list);
    mLiveChannels.setAdapter(mAdapter);

    mLiveChannels.setMode(Mode.DISABLED);
    mLiveChannels.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {

        @Override
        public void onLastItemVisible() {
            getNextPage();
        }
    });

    getNextPage();
}
 
开发者ID:jiangerji,项目名称:danmaku-project,代码行数:41,代码来源:LiveChannelActivity.java


注:本文中的com.handmark.pulltorefresh.library.PullToRefreshGridView.setOnLastItemVisibleListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。