Skip to content
Projects

yll2wcf/YLListView has 254 GitHub stars and 57 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-18 00:55 UTC. Last push 2015-12-30.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

YLListView仿IOS弹簧效果的ListView

Developer Tools

README.md

Original

YLListView

YLListView仿IOS弹簧效果的ListView

使用方法

 compile 'com.a520wcf.yllistview:YLListView:1.0.1'

使用介绍:

布局:

<com.a520wcf.yllistview.YLListView
    android:divider="@android:color/transparent"
    android:id="@+id/listView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    />	

代码:

private YLListView listView;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    listView = (YLListView) findViewById(R.id.listView);
    // 不添加也有默认的头和底
    View topView=View.inflate(this,R.layout.top,null);
    listView.addHeaderView(topView);
    View bottomView=new View(getApplicationContext());
    listView.addFooterView(bottomView);

    // 顶部和底部也可以固定最终的高度 不固定就使用布局本身的高度
    listView.setFinalBottomHeight(100);
    listView.setFinalTopHeight(100);

    listView.setAdapter(new DemoAdapter());

    //YLListView默认有头和底  处理点击事件位置注意减去
    listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            position=position-listView.getHeaderViewsCount();
        }
    });


}