您的位置:首页 > 其它

wheelView实现滚动选择 三方开源的封装控件 spannableString autofitTextView、PinnedSectionListView SwipeListView等等

2016-02-01 17:36 375 查看
wheelView多用于popupwindow用来滚动选择条目

github上的开源三方控件 spannableString autofitTextView、PinnedSectionListView(固定标签) SwipeListView(右滑删除) Titanic(loading动画) AutoHideListView(自动隐藏上下View的ListView)

大部分的三方控件都是类似的流程 用自己的布局 封装控件

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<com.wangjie.wheelview.WheelView
android:id="@+id/wheel_view_wv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>

</LinearLayout>


wheelView.xml
注意: MainActivity中的list数据如果使用BaseAdapter的话 因为其中wheelView设置了offset所以取数据的时候需要减去offset值否则会报错list.get(position-offset);

效果如图

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: