daimajia / AndroidSwipeLayout

The Most Powerful Swipe Layout!
MIT License
12.38k stars 2.67k forks source link

Is there a way to include "show_mode" in the SwipeLayout definition in the xml file? #197

Open sailrish opened 9 years ago

sailrish commented 9 years ago

This is one of the best solutions I have found for swipe-action implementation in Android. :+1: for a great job!

My comment was about this line:

swipeLayout.setShowMode(SwipeLayout.ShowMode.LayDown);

If there was a way to specify the show mode in the XML file itself instead of in code, that would be great. Like so:

<com.daimajia.swipe.SwipeLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  custom:show_mode="lay_down"
  android:layout_width="match_parent"
  android:layout_height="80dp">
. . .
wrozwad commented 8 years ago

As I see in attrs.xml it work's exactly as you say ;)

So we have app:show_mode="lay_down" and app:show_mode="pull_out"

NguyenNamHung commented 8 years ago

So what about Single and Multi mode?