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


Java PullToRefreshGridView.setAdapter方法代码示例

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


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

示例1: initView

import com.handmark.pulltorefresh.library.PullToRefreshGridView; //导入方法依赖的package包/类
private void initView() {
    gridView = (PullToRefreshGridView) findViewById(R.id.pull_refresh_gird_view);
    gridView.setOnScrollListener(new PauseOnScrollListener(bitmapUtils, true, false));
    adapter = new GridViewAdapter(datas,getApplicationContext(),bitmapUtils);
    gridView.setAdapter(adapter);
    button = (Button) findViewById(R.id.grid_view_back);
    button.setOnClickListener(this);
}
 
开发者ID:liupengandroid,项目名称:ywApplication,代码行数:9,代码来源:GirdViewActivity.java

示例2: 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

示例3: onCreateView

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

    mAdapter = new GameAdapter();
    mPullRefreshGridView.setAdapter(mAdapter);
    mPullRefreshGridView.setOnItemClickListener(new OnItemClickListener() {

        @Override
        public void onItemClick(
                AdapterView<?> parent, View view, int position, long id) {
            GameInfo gameInfo = mAdapter.getItem(position);
            Intent intent = new Intent();
            intent.setClass(parent.getContext(),
                    LiveChannelActivity.class);
            intent.putExtra(LiveChannelActivity.GAME_ID,
                    gameInfo.getGameId());
            intent.putExtra(LiveChannelActivity.GAME_NAME,
                    gameInfo.getGameName());

            getActivity().startActivity(intent);
        }
    });

    init();

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

示例4: 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.setAdapter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。