SelectionView-快速跳选View

2016-09-06  本文已影响0人  AlexMofer

SelectionView

ICON

快速跳选View,与列表视图搭配使用(ListView、RecyclerView),常用于联系人列表快速选取。

预览

Screenshots

要求

minSdkVersion 4

链接

使用

<am.widget.selectionview.SelectionView xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/selection_sv_selection"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:svBarBackground="@drawable/bg_selection_bar"
    app:svBarItemHeight="32dp"
    app:svBarSlider="@drawable/ic_selection_slider"
    app:svBarStyle="List"
    app:svBarWidth="32dp"
    app:svNoticeAnimation="true"
    app:svNoticeBackground="@drawable/bg_selection_notice"
    app:svNoticeHeight="64dp"
    app:svNoticeLocation="ViewCenter"
    app:svNoticePadding="10dp"
    app:svNoticeWidth="64dp" />
SelectionView selection = (SelectionView) findViewById(R.id.selection_sv_selection);
selection.setBarStyle(SelectionView.STYLE_SLIDER);
selection.setBarBackground(0);
selection.setNoticeBackground(R.drawable.bg_selection_notice_slider);
selection.setNoticeLocation(SelectionView.LOCATION_SLIDER_TOP);
selection.setSelection(this);
selection.setOnSelectedListener(this);

注意

上一篇 下一篇

猜你喜欢

热点阅读