Android 分页滚动列表控件 PagedListView

码农软件 · 软件分类 · Android UI 组件 · 2019-04-24 15:28:49

软件介绍

ListView等滚动位置经常不符合用户期望:

很多时候都是看完一页想滑到下一页,但滑动一次距离往往不是不够就是超过,很难控制。

PagedListView工程中提供了PageScroller来解决这个问题。

使用PageScroller可以在 中低速滑动 后会滚动一页,很慢滑动 或 很快滑动 则按默认处理。


使用方法如下:

new PageScroller(listView).init();

工程中还提供了几个Demo,比如ListViewActivity

package zuo.biao.pagedlistview;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

/**ListView示例
 * @author Lemon
 */
public class ListViewActivity extends Activity {

 private ListView lvListView;
 private List<String> list;
 @Override
 protected void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.list_view_activity);
 
     lvListView = (ListView) findViewById(R.id.lvListView);

     list = new ArrayList<String>();
     for (int i = 0; i < 100; i++) {
         list.add("Item" + i);
     }
 
     lvListView.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, list));

     new PageScroller(lvListView).init();
 }
}

下载地址(欢迎Star,欢迎Fork)

https://github.com/TommyLemon/PagedListView

下载试用

PagedListView.apk

本文地址:https://codercto.com/soft/d/4290.html

About Face 2.0

About Face 2.0

Alan Cooper、Robert M. Reimann / Wiley / March 17, 2003 / USD 35.00

First published seven years ago-just before the World Wide Web exploded into dominance in the software world-About Face rapidly became a bestseller. While the ideas and principles in the original book......一起来看看 《About Face 2.0》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

SHA 加密
SHA 加密

SHA 加密工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具