alexandrius / accordion-swipe-layout

Accordion Swipe Layout for Android
135 stars 27 forks source link

Support for inner child in SwipeLayout #2

Closed NaikSoftware closed 7 years ago

NaikSoftware commented 7 years ago
<?xml version="1.0" encoding="utf-8"?>
<com.alexandrius.accordionswipelayout.library.SwipeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/swipe_layout"
    android:layout_width="match_parent"
    android:layout_height="80dp"
    app:canFullSwipeFromRight="true"
    app:iconSize="@dimen/icon_size"
    app:leftItemColors="@array/leftColors"
    app:leftItemIcons="@array/leftDrawables"
    app:rightItemColors="@array/rightColors"
    app:rightItemIcons="@array/rightDrawables"
    app:rightStrings="@array/rightTexts"
    app:rightTextColors="@array/rightTextColors"
    app:swipeItemWidth="@dimen/swipe_item_width"
    app:textSize="@dimen/text_size">

    <include layout="@layout/sample_item"/>

</com.alexandrius.accordionswipelayout.library.SwipeLayout>

First child used as item view if no app:layout attribute found.

NaikSoftware commented 7 years ago

Added support for tinting icons

app:rightIconColors="@array/rightDrawableColors"
app:leftIconColors="@array/leftDrawableColors"
NaikSoftware commented 7 years ago

Added attributes: autoHideSwipe - collapse swipe when start scroll RecyclerView (default true); onlyOneSwipe - collapse expanded items when swipe other item.