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


Java PullToRefreshGridView类代码示例

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


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

示例1: initLastRefreshTime

import com.handmark.pulltorefresh.library.PullToRefreshGridView; //导入依赖的package包/类
/**
 * 初始化上次刷新时间
 * 
 * @param saveLastRefreshkey
 * @param mPullRefreshGridView
 */
protected void initLastRefreshTime(String saveLastRefreshkey,
		PullToRefreshGridView mPullRefreshGridView) {
	String label = "最后更新:";
	if (com.himoo.ydsc.util.SharedPreferences.getInstance()
			.getString(saveLastRefreshkey, "").equals("")) {
		label += TimestampUtils.getTimeState(saveLastRefreshkey);

	} else {
		label += TimestampUtils.getTimeState(
				com.himoo.ydsc.util.SharedPreferences.getInstance()
						.getString(saveLastRefreshkey, ""),
				"yyyy-MM-dd HH:mm");
		;
	}
	// Update the LastUpdatedLabel
	mPullRefreshGridView.getLoadingLayoutProxy().setLastUpdatedLabel(label);
}
 
开发者ID:justingboy,项目名称:CouldBooks,代码行数:24,代码来源:BaseFragment.java

示例2: initPullToGrdView

import com.handmark.pulltorefresh.library.PullToRefreshGridView; //导入依赖的package包/类
/**
 * 初始化GridView
 * 
 * @param view
 */
private void initPullToGrdView(View view) {
	mPullToGridView = (PullToRefreshGridView) view
			.findViewById(R.id.shelf_book_gridview);
	shelf_empty_image = (ImageView) view
			.findViewById(R.id.shelf_empty_image);
	mPullToGridView.setMode(Mode.DISABLED);
	if (mDownloadList == null || mDownloadList.isEmpty()) {
		shelf_empty_image.setVisibility(View.VISIBLE);
	} else {
		shelf_empty_image.setVisibility(View.GONE);
	}
	mGridView = mPullToGridView.getRefreshableView();
	mGridView.setOnScrollListener(this);
	mGridView.setOnItemClickListener(this);
	mGridView.setOnItemLongClickListener(this);
	mAdapter = new BookDownloadAdapter(getActivity(),
			R.layout.adapter_bookshelf_item, mDownloadList);
	sortBookList(mDownloadList);
	mGridView.setAdapter(mAdapter);

}
 
开发者ID:justingboy,项目名称:CouldBooks,代码行数:27,代码来源:BookShelfFragment.java

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

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

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

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

示例7: AdapterCaller

import com.handmark.pulltorefresh.library.PullToRefreshGridView; //导入依赖的package包/类
public AdapterCaller(Context context, PullToRefreshGridView ptr_gridview, 
					int method, int scheme,  String server, String path) {
	super(method, scheme, server, path);
	this.context = context;
	this.ptr_gridview = ptr_gridview;
}
 
开发者ID:NanneHuiges,项目名称:androblip,代码行数:7,代码来源:AdapterCaller.java

示例8: updateView

import com.handmark.pulltorefresh.library.PullToRefreshGridView; //导入依赖的package包/类
public static void updateView(Context context, PullToRefreshGridView ptr_gridview,String view, int max){
	updateView(context, ptr_gridview,view,max,SIZE_BIG,THUMB_COLOR);
}
 
开发者ID:NanneHuiges,项目名称:androblip,代码行数:4,代码来源:BlipView.java

示例9: getRefreshView

import com.handmark.pulltorefresh.library.PullToRefreshGridView; //导入依赖的package包/类
/**
 * 获取下拉刷新View
 * @return
 */
public PullToRefreshGridView getRefreshView(){
    return refreshView;
}
 
开发者ID:bodismile,项目名称:smile-mvp,代码行数:8,代码来源:BaseFragmentWithGridRefresh.java


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