alexandrius / accordion-swipe-layout

Accordion Swipe Layout for Android
136 stars 27 forks source link

Attribute "layout" has already been defined #3

Closed ghost closed 7 years ago

ghost commented 7 years ago

The attribute "layout" clashes with the attribute "layout" of the android support library. Could it be renamed to something more specific like foregroundLayout, baseItemLayout...

alexandrius commented 7 years ago

Great idea. Will change it

alexandrius commented 7 years ago

Until I update the library you can add custom layout as first child of the SwipeLayout.

<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:iconSize="@dimen/icon_size"
    app:leftItemColors="@array/leftColors"
    app:leftItemIcons="@array/leftDrawables"
    app:rightItemColors="@array/rightColors"
    app:rightIconColors="@array/rightDrawableColors"
    app:canFullSwipeFromLeft="true"
    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>
alexandrius commented 7 years ago

Implemented in latest 0.5.0 version