本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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();
}
示例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;
}
示例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);
}
示例9: getRefreshView
import com.handmark.pulltorefresh.library.PullToRefreshGridView; //导入依赖的package包/类
/**
* 获取下拉刷新View
* @return
*/
public PullToRefreshGridView getRefreshView(){
return refreshView;
}