com.lidroid.xutils.bitmap.PauseOnScrollListener Java Examples
The following examples show how to use
com.lidroid.xutils.bitmap.PauseOnScrollListener.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TopFragment.java From miappstore with Apache License 2.0 | 6 votes |
/** * 可见时,需要启动监听,以便随时根据下载状态刷新页面 */ @Override protected View createSuccessView() { listView = new BaseListView(getContext()) { @Override public void refresh() { show(); } }; //第二个参数,满速滑动,第三个快速滑动,false加载,true不加载 listView.setOnScrollListener(new PauseOnScrollListener(bitmapUtils, false, true)); listApp = load.getListApp(); listAdapter = new TopListAdapter(listApp, listView, getContext()) { @Override public String getHostUrls() { return load.getHost(); } }; listAdapter.startObserver(); listView.setAdapter(listAdapter); listView.setSwipeRefreshLayout(swipeRefreshLayout); return listView; }
Example #2
Source File: LoadListView.java From QiQuYing with Apache License 2.0 | 5 votes |
private void init(Context context) { progressAnimation = AnimationUtils.loadAnimation(context, R.anim.progress_anim); inflater = LayoutInflater.from(context); footView = inflater.inflate(R.layout.footer, null); // footView.findViewById(R.id.load_layout).setVisibility(View.GONE); footerProgressImg = (ImageView) footView.findViewById(R.id.progress); footerProgressImg.startAnimation(progressAnimation); addFooterView(footView, null, false); // 设置滚动监听事件 // setOnScrollListener(this); //设置listview加载时不滚动 setOnScrollListener(new PauseOnScrollListener(BitmapUtil.mBitmapUtils, false, true, this)); }