本文整理汇总了Java中com.handmark.pulltorefresh.library.PullToRefreshListView类的典型用法代码示例。如果您正苦于以下问题:Java PullToRefreshListView类的具体用法?Java PullToRefreshListView怎么用?Java PullToRefreshListView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PullToRefreshListView类属于com.handmark.pulltorefresh.library包,在下文中一共展示了PullToRefreshListView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findViews
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
private void findViews() {
this.mPullRefreshListView = (PullToRefreshListView) findViewById(R.id.listview);
this.mListView = (ListView) this.mPullRefreshListView.getRefreshableView();
this.mListView.addHeaderView(getHeaderView());
this.mListView.setSelector(R.color.in);
this.mPullRefreshListView.setOnRefreshListener(new OnRefreshListener<ListView>() {
public void onRefresh(PullToRefreshBase<ListView> pullToRefreshBase) {
MyTimelineActivity.this.getCurrentStatus();
}
});
this.mPullRefreshListView.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {
public void onLastItemVisible() {
if (MyTimelineActivity.this.mPosts.size() > 0) {
MyTimelineActivity.this.getPreviousStatus();
}
}
});
}
示例2: init
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
private void init() {
this.mPullRefreshListView = (PullToRefreshListView) findViewById(R.id.listview);
this.mListView = (ListView) this.mPullRefreshListView.getRefreshableView();
this.mEmptyView = (TextView) findViewById(R.id.empty_view);
this.mListView.setEmptyView(this.mEmptyView);
if (this.mType.equals(Notification.FRIENDSHIP)) {
Drawable topDrawable = getResources().getDrawable(R.drawable.a5o);
topDrawable.setBounds(0, 0, ViewUtils.dip2px(this.activity, 120.0f), ViewUtils.dip2px
(this.activity, 120.0f));
this.mEmptyView.setCompoundDrawables(null, topDrawable, null, null);
}
this.mPullRefreshListView.setOnRefreshListener(new OnRefreshListener<ListView>() {
public void onRefresh(PullToRefreshBase<ListView> pullToRefreshBase) {
NotificationActivity.this.getNotifications();
}
});
this.mPullRefreshListView.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {
public void onLastItemVisible() {
NotificationActivity.this.getPreviousNotifications();
}
});
}
示例3: findViews
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
private void findViews() {
this.mPullRefreshListView = (PullToRefreshListView) findViewById(R.id.listview);
this.mListView = (ListView) this.mPullRefreshListView.getRefreshableView();
this.mListView.addHeaderView(getHeaderView());
this.mListView.setSelector(R.color.in);
this.mPullRefreshListView.setOnRefreshListener(new OnRefreshListener<ListView>() {
public void onRefresh(PullToRefreshBase<ListView> pullToRefreshBase) {
UserTimelineActivity.this.getCurrentStatus();
}
});
this.mPullRefreshListView.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {
public void onLastItemVisible() {
if (!UserTimelineActivity.this.isLastVisible) {
UserTimelineActivity.this.getPreviousStatus();
}
}
});
}
示例4: findViews
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
private void findViews() {
this.mPullRefreshListView = (PullToRefreshListView) findViewById(R.id.listview);
this.mListView = (ListView) this.mPullRefreshListView.getRefreshableView();
this.mPullRefreshListView.setOnRefreshListener(new OnRefreshListener<ListView>() {
public void onRefresh(PullToRefreshBase<ListView> pullToRefreshBase) {
RecommendTimelineActivity.this.getCurrentTopic();
}
});
this.mPullRefreshListView.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {
public void onLastItemVisible() {
if (!RecommendTimelineActivity.this.isLastVisible) {
RecommendTimelineActivity.this.getNextTopic();
}
}
});
}
示例5: inject
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
public void inject(Finder finder, final T target, Object source) {
target.mPullRefreshListView = (PullToRefreshListView) finder.castView((View) finder
.findRequiredView(source, R.id.listview, "field 'mPullRefreshListView'"), R.id
.listview, "field 'mPullRefreshListView'");
View view = (View) finder.findRequiredView(source, R.id.fab_button, "field 'fabButton' " +
"and method 'onClick'");
target.fabButton = (FloatingActionButton) finder.castView(view, R.id.fab_button, "field " +
"'fabButton'");
view.setOnClickListener(new DebouncingOnClickListener() {
public void doClick(View p0) {
target.onClick(p0);
}
});
target.tvIndicator = (View) finder.findRequiredView(source, R.id.tv_indicator, "field " +
"'tvIndicator'");
}
示例6: initListView
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
private void initListView() {
this.mPullToRefreshListView = (PullToRefreshListView) getView().findViewById(R.id.listview);
this.mListView = (ListView) this.mPullToRefreshListView.getRefreshableView();
this.mPullToRefreshListView.setOnRefreshListener(new OnRefreshListener<ListView>() {
public void onRefresh(PullToRefreshBase<ListView> pullToRefreshBase) {
FansFragment.this.page = 1;
FansFragment.this.getFans();
}
});
this.mPullToRefreshListView.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> adapterView, View arg1, int arg2, long arg3) {
Intent intent = new Intent(FansFragment.this.getActivity(), UserTimelineActivity
.class);
intent.putExtra(UserTimelineActivity.NICK_NAME, FansFragment.this.mAdapter
.getItem(arg2 - 1).nickname);
FansFragment.this.startActivity(intent);
}
});
this.mPullToRefreshListView.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {
public void onLastItemVisible() {
if (!FansFragment.this.isLastVisible) {
FansFragment.this.getNextFans();
}
}
});
}
示例7: initListView
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
private void initListView() {
this.mPullToRefreshListView = (PullToRefreshListView) getView().findViewById(R.id.listview);
this.mListView = (ListView) this.mPullToRefreshListView.getRefreshableView();
this.mPullToRefreshListView.setOnRefreshListener(new OnRefreshListener<ListView>() {
public void onRefresh(PullToRefreshBase<ListView> pullToRefreshBase) {
FriendFragment.this.getFriends();
}
});
this.mPullToRefreshListView.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> adapterView, View arg1, int arg2, long arg3) {
Intent intent = new Intent(FriendFragment.this.getActivity(),
UserTimelineActivity.class);
intent.putExtra(UserTimelineActivity.NICK_NAME, FriendFragment.this.mAdapter
.getItem(arg2 - 1).nickname);
FriendFragment.this.startActivity(intent);
}
});
this.mPullToRefreshListView.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {
public void onLastItemVisible() {
if (!FriendFragment.this.isLastVisible) {
FriendFragment.this.getNextFriends();
}
}
});
}
示例8: findViews
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
private void findViews() {
this.fab_button = (FloatingActionButton) findViewById(R.id.fab_button);
this.fab_button.setVisibility(8);
this.mHeaderView = new ImageView(this);
this.mHeaderView.setScaleType(ScaleType.CENTER_CROP);
this.mHeaderView.setLayoutParams(new LayoutParams(-1, -2));
this.mPullRefreshListView = (PullToRefreshListView) findViewById(R.id.listview);
this.mListView = (ListView) this.mPullRefreshListView.getRefreshableView();
this.mListView.addHeaderView(this.mHeaderView);
this.mPullRefreshListView.setOnRefreshListener(new OnRefreshListener<ListView>() {
public void onRefresh(PullToRefreshBase<ListView> pullToRefreshBase) {
ChannelPostsActivity.this.getCurrentTopic();
}
});
this.mPullRefreshListView.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {
public void onLastItemVisible() {
if (!ChannelPostsActivity.this.isLastVisible) {
ChannelPostsActivity.this.getNextTopic();
}
}
});
}
示例9: init
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
private void init() {
this.mStatusCache = FileCache.get(this.ctx, getClass().getName());
this.mMealType = getIntent().getStringExtra("meal_type");
setActionBarTitle();
this.mBean = getCacheData();
this.mDatas = this.mBean != null ? this.mBean.getMeals() : new ArrayList();
this.loadingFooter = new TurboLoadingFooter(this);
this.mAdapter = new SelectStatusAdapter(this.ctx, this.mDatas);
this.mListView = (PullToRefreshListView) this.finder.find(R.id.listView);
((ListView) this.mListView.getRefreshableView()).addFooterView(this.loadingFooter.getView
());
this.mListView.setOnScrollListener(new PauseOnScrollListener(this.imageLoader, true, true));
this.mListView.setOnRefreshListener(new RefreshL());
this.mListView.setOnLastItemVisibleListener(new LoadMoreL());
this.mListView.setOnItemClickListener(this);
this.mListView.setAdapter(this.mAdapter);
}
示例10: inject
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
public void inject(Finder finder, final T target, Object source) {
target.avatar = (CircleImageView) finder.castView((View) finder.findRequiredView(source,
R.id.avatar, "field 'avatar'"), R.id.avatar, "field 'avatar'");
target.tvAdviser = (TextView) finder.castView((View) finder.findRequiredView(source, R.id
.tv_adviser, "field 'tvAdviser'"), R.id.tv_adviser, "field 'tvAdviser'");
target.tvWechat = (TextView) finder.castView((View) finder.findRequiredView(source, R.id
.tv_wechat, "field 'tvWechat'"), R.id.tv_wechat, "field 'tvWechat'");
target.viewRefresh = (PullToRefreshListView) finder.castView((View) finder
.findRequiredView(source, R.id.view_refresh, "field 'viewRefresh'"), R.id
.view_refresh, "field 'viewRefresh'");
target.etInput = (EditText) finder.castView((View) finder.findRequiredView(source, R.id
.et_input, "field 'etInput'"), R.id.et_input, "field 'etInput'");
target.viewBottom = (LinearLayout) finder.castView((View) finder.findRequiredView(source,
R.id.view_bottom, "field 'viewBottom'"), R.id.view_bottom, "field 'viewBottom'");
((View) finder.findRequiredView(source, R.id.bt_send, "method 'onClick'"))
.setOnClickListener(new DebouncingOnClickListener() {
public void doClick(View p0) {
target.onClick();
}
});
}
示例11: SelectFavoriteFolderDialog
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
public SelectFavoriteFolderDialog(Context context, MQuestion question) {
super(context);
if (question == null) {
throw new IllegalArgumentException("question is null");
}
mQuestion = question;
setTitle(R.string.select_favorite_folder);
setContentView(R.layout.dialog_select_folder);
adjustHeight();
setPositiveButton(false, null, this);
mListView = (PullToRefreshListView) findViewById(R.id.list);
mListView.setOnRefreshListener(this);
View header = LayoutInflater.from(getContext()).inflate(R.layout.dialog_select_folder_header, null);
header.setOnClickListener(this);
mListView.getRefreshableView().addHeaderView(header);
mAdapter = new RequestAdapter(mLoader, mViewProvider);
mListView.setAdapter(mAdapter);
}
示例12: onActivityCreated
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
int type = getArguments().getInt(TAB_TYPE);
mContext = getActivity();
if (AppConstants.NEW_FORUM_ID == type) {
threadId = AppConstants.NEW_FORUM_ID;
tag =AppConstants.NEWFORUM_REQUEST_TAG;
} else {
threadId = AppConstants.SECRITY_FORUM_ID;
tag = AppConstants.SECURITY_REQUEST_TAG;
}
url = UrlUtil.getThreadUrl(threadId, 1);
mBar = (LinearLayout) getView().findViewById(R.id.id_layout_progressbar);
mBar.setVisibility(View.VISIBLE);
pullToRefreshListView = (PullToRefreshListView) getView().findViewById(R.id.id_pull_refresh_listview);
initData();
getDatas();
initEvent();
mAdapter = new ThreadAdapter(mContext,datas,type);
ListView mListView = pullToRefreshListView.getRefreshableView();
mListView.setAdapter(mAdapter);
}
示例13: onCreate
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_post_detail);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
threadBean = (ThreadBean) getIntent().getSerializableExtra(ACTIVITY_KEY);
getSupportActionBar().setTitle(R.string.post_comments);
threadBean = (ThreadBean) getIntent().getSerializableExtra(ACTIVITY_KEY);
getDatas();
mListView = (PullToRefreshListView) findViewById(R.id.id_pullListView);
progressbar = (LinearLayout) findViewById(R.id.id_layout_progressbar);
progressbar.setVisibility(View.VISIBLE);
initPullListView();
initEvent();
mAdapter = new PostReplyAdapter(this, datas);
mListView.setAdapter(mAdapter);
}
示例14: onCreate
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent input = getIntent();
if (input != null) {
subBean = (ForumSubBean) input.getSerializableExtra(KEY);
}
if (subBean != null) {
getSupportActionBar().setTitle(subBean.getName());
}
setContentView(R.layout.acitivity_forum_show);
pListView = (PullToRefreshListView) findViewById(R.id.id_pull_refresh_listview);
mBar = (LinearLayout) findViewById(R.id.id_layout_progressbar);
mBar.setVisibility(View.VISIBLE);
initData();
getDatas(curPage);
initEvent();
mAdapter = new ThreadAdapter(ForumShowActivity.this, datas,0);
ListView mListView = pListView.getRefreshableView();
mListView.setAdapter(mAdapter);
}
示例15: initViews
import com.handmark.pulltorefresh.library.PullToRefreshListView; //导入依赖的package包/类
@Override
public void initViews() {
rlBack=(RelativeLayout)findViewById(R.id.rlBack);
material_back_button=(MaterialMenuView) findViewById(R.id.material_back_button);
tvTitle=(TextView) findViewById(R.id.tvTitle);
ivRight=(ImageView) findViewById(R.id.ivRight);
ivRight.setImageResource(R.mipmap.ic_menu_add);
ivRight.setVisibility(View.VISIBLE);
plAlbums=(PullToRefreshListView)findViewById(R.id.plAlbums);
lvAlbums=plAlbums.getRefreshableView();
material_back_button.setState(MaterialMenuDrawable.IconState.ARROW);
tvTitle.setText("相册");
FooterView= LayoutInflater.from(this).inflate(R.layout.list_footer,null);
ivLoading =(ImageView) FooterView.findViewById(R.id.ivLoading);
tvLoading=(TextView)FooterView.findViewById(R.id.tvLoading);
lvAlbums.addFooterView(FooterView);
loading(ivLoading);
}