chthai64 / swipereveallayout Goto Github PK
View Code? Open in Web Editor NEWEasy, flexible and powerful Swipe Layout for Android
License: MIT License
Easy, flexible and powerful Swipe Layout for Android
License: MIT License
I'm getting this error in my adapter. How to solve it
Hi,
I observed that when you change orientation from Portrait to Landscape the ListView row sticks to the same width giving improper size of ListView row. Also, same is the case with changing orientation from Landscape to Portrait.
I am using
android:configChanges="orientation|keyboardHidden|screenSize"
in AndroidManifest.xml
Please provide the fix!
Thanks!
Can't figure it out! Pls help by providing code! More precisely I'm looking for a listener method that tells me if viewholder has been swiped. it's extremely important
Thanks for Library.
While using RecyclerView with RecyclerView.Adapter multiple item is visible for deleting. It is good for delete multiple item at a time. See the below screenshot
https://goo.gl/OkLJrL
What if I want to allow user to delete only 1 item at a time?
Hello..
I think there is conflict with google service and support libraries, cause when I just add dependecy of swipereveallayout and ran project it stopped with this error:
"The Google Play services resources were not found. Check your project configuration to ensure that the resources are included."
support version 23.3.0
play-services 8.4.0
what is the solustion?
hi
i have one recyclerView with cardview items
inside SwipeRevealLayout ... FrameLayout1 ... have 2 linear (such edit and delete) with layout_height=match_parent ... inside FrameLayout2 have one cardview
i want both card view and framelayout1 have same size...
but framelayout1 before scrolling is wrap_content after scrolling recyclerView both framelayouts have same size :|
now what should i do !?
English is not my mother tongue; please excuse any errors on my part
<com.chauthai.swipereveallayout.SwipeRevealLayout
android:id="@+id/swipe_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layoutDirection="ltr"
app:dragEdge="right"
app:mode="normal">
<FrameLayout
android:id="@+id/dsad"
android:layout_width="@dimen/value_70dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/value_5dp"
android:layout_marginTop="@dimen/value_10dp"
android:orientation="vertical"
android:weightSum="2">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/delete"
android:orientation="vertical"
android:weightSum="2"
>
<LinearLayout
android:id="@+id/address_list_item_edit"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/edit"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:padding="@dimen/value_10dp"
android:src="@drawable/ic_create_white_36dp"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/address_list_item_delete"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:padding="@dimen/value_10dp"
android:src="@drawable/ic_delete_forever_white_36dp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<android.support.v7.widget.CardView
android:id="@+id/cardvie2w"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
card_view:cardBackgroundColor="@android:color/white"
card_view:cardCornerRadius="5dp"
card_view:cardElevation="4dp"
card_view:cardUseCompatPadding="true"
card_view:contentPadding="5dp"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/basket_btn_buy"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="right|center"
android:gravity="right|center"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/address_list_item_country"
fontPath="fonts/sansbold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:text="@string/hint_country"
android:textAppearance="?android:attr/textAppearanceSmall"
tools:ignore="MissingPrefix"
/>
<TextView
android:id="@+id/address_list_item_title"
fontPath="fonts/sansbold.ttf"
tools:ignore="MissingPrefix"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/address_list_item_country"
android:gravity="right"
android:text="@string/hint_name"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/adrs_title1"
/>
</RelativeLayout>
</LinearLayout>
<View
android:id="@+id/view"
android:layout_width="wrap_content"
android:layout_height="1dp"
android:layout_gravity="center"
android:background="@android:color/darker_gray"/>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</FrameLayout>
</com.chauthai.swipereveallayout.SwipeRevealLayout>
I use a Recycler view where user can do click, long click and swipe. I don't have any problem with long click and swipe, but when I try to do a click, four out five times, I end up getting a swipe gesture instead a click.
I tried app:minDistRequestDisallowParent=20dp
but I do not notice any improvement. Also I tried setMinFlingVelocity
without success.
Any idea about what I'm doing wrong?
Thanks.
Is there any option for left and right swiping at same time like this example? If there is how can I achieve that?
I wonder this lib is able to swipe both directions (right + left) same time?
if I set the
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
click();
}
});
the event is never fired. I tried to put as many items in my row not clickable or focusable.
Is that something that can happen with this library or should I look somewhere else?
regarding on #6 , still i cannot make it work pls. help... specially the last part that you mentioned...
"use adapter.setOnItemClickListener() before attaching it to the listview"... sorry i just new on android development.. thanks :)
In this code you have added only right swipe to the recycler view, how can I add left swipe?
Video which shows the bug: https://dl.dropboxusercontent.com/u/19390574/reveal_layouts_clickable_bug.mp4
RecyclerViewHolder where the binding of the layouts is done:
private class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{
private SwipeRevealLayout swipeLayout;
private View deleteLayout, deactivate_layout;
private TextView medicineNameTV, medicineDescriptionTV, medicineIntakeDetailsTV;
public ViewHolder(View itemView) {
super(itemView);
swipeLayout = (SwipeRevealLayout) itemView.findViewById(R.id.swipe_layout);
deleteLayout = itemView.findViewById(R.id.delete_layout);
deactivate_layout = itemView.findViewById(R.id.deactivate_layout);
medicineNameTV = (TextView) itemView.findViewById(R.id.medicineNameTV);
medicineDescriptionTV = (TextView) itemView.findViewById(R.id.medicineDescriptionTV);
medicineIntakeDetailsTV = (TextView) itemView.findViewById(R.id.medicineIntakeDetailsTV);
}
public void bind(Medication medicationItem) {
deleteLayout.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
medicationDAO.delete(medicationsList.get(getAdapterPosition()));
medicationsList.remove(getAdapterPosition());
notifyItemRemoved(getAdapterPosition());
}
});
medicineNameTV.setText(WordUtils.capitalizeFully(medicationItem.getName()));
medicineDescriptionTV.setText(medicationItem.getDescription());
medicineIntakeDetailsTV.setText(medicationItem.getDosage()
+ " - "
+ medicationItem.getWhen()
+ " - "
+ medicationItem.getFrequency());
}
}
XML holding the layout for each of the recyclerview's items:
<?xml version="1.0" encoding="utf-8"?>
<com.chauthai.swipereveallayout.SwipeRevealLayout
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="@dimen/medications_list_row_item_height"
android:background="@color/white"
android:clickable="false"
android:focusable="true"
app:dragEdge="right"
app:mode="normal"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<RelativeLayout
android:id="@+id/deactivate_layout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/camera_gray_color"
android:gravity="center"
android:paddingEnd="@dimen/default_margin_1"
android:paddingStart="@dimen/default_margin_1"
>
<ImageView
android:id="@+id/deactivateImageIV"
android:layout_width="@dimen/action_items_delete_deactivate_icons"
android:layout_height="@dimen/action_items_delete_deactivate_icons"
android:layout_centerInParent="true"
android:src="@drawable/ic_deactivate_medication"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/deactivateImageIV"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="Deactivate"
android:textColor="@android:color/white"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/delete_layout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/medication_list_delete_action_layout_red"
android:gravity="center"
android:paddingEnd="@dimen/default_margin_2"
android:paddingStart="@dimen/default_margin_2"
>
<ImageView
android:id="@+id/deleteImageIV"
android:layout_width="@dimen/action_items_delete_deactivate_icons"
android:layout_height="@dimen/action_items_delete_deactivate_icons"
android:layout_centerInParent="true"
android:src="@drawable/ic_delete_medication"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/deleteImageIV"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="Delete"
android:textColor="@android:color/white"
/>
</RelativeLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/medications_list_row_item_height"
android:background="@color/white"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="@dimen/default_margin_2"
android:paddingTop="@dimen/default_margin_2"
>
<TextView
android:id="@+id/medicineNameTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/default_margin_1"
android:textColor="@android:color/black"
/>
<TextView
android:id="@+id/medicineDescriptionTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/medication_list_item_name_gray"
/>
<TextView
android:id="@+id/medicineIntakeDetailsTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/medication_list_item_name_gray"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/arrowLayout"
android:layout_width="@dimen/right_arrow_layout_width"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:background="@color/much_lighter_gray"
android:gravity="center"
>
<ImageView
android:layout_width="@dimen/far_right_arrow_icon_dimens"
android:layout_height="@dimen/far_right_arrow_icon_dimens"
android:src="@drawable/ic_arrow_right_blue"
/>
</LinearLayout>
<ImageView
android:id="@+id/reminderStatusIV"
android:layout_width="@dimen/reminder_status_icon_dimens"
android:layout_height="@dimen/reminder_status_icon_dimens"
android:layout_centerVertical="true"
android:layout_gravity="end|center_vertical"
android:layout_marginEnd="@dimen/default_margin_1"
android:layout_toStartOf="@+id/arrowLayout"
android:src="@drawable/ic_reminder_active"
/>
</RelativeLayout>
</com.chauthai.swipereveallayout.SwipeRevealLayout>
Any help with this? Thanks for a cool lib
Is it possible to open only one at a time? Eg. if row 1is opened and I now opens row two means , row one should automatically close.
Viewpager events are not happening.
Hello, i was testing your library to use it on an app and i found a weird bug.
this is my swipe layout test xml :
<!-- Your secondary layout here --> <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginRight="20dp"> <Button android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="EDIT"/> <Button android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="DELETE"/> </LinearLayout>
using RecyclerView.Adapter's typical implementation (https://developer.android.com/training/material/lists-cards.html) , and following your readme guide, on the last item of the adapter's dataset, the buttons show small (wrapped around the text) and don't match or fill the parent ( i've tried both match_parent and fill_parent) , it looks like they're defaulting to wrap_content.
the rest of the interface works correctly, and the rest of items show fine, it's just the last two buttons.
After my my onClickListener is called I have the swipeLayout close. However when I call the close method nothing occurs regardless of whether I set animation to true or false
Sorry, if duplicated.
I tried to fiddle around with params but I'm not sure where to look for and what to set it to.
When I click on a row, many times the click is considered as drag and it doesn't go through.
What should I set and what to?
Thank you
I'm using Recycler view and managed to show the delete button. Now how can I handle the delete button. I need to get the unique id of clicked delete button. Is it possible?
Is posible swipe left and right, show diferents panels?
Sample:
swipe left panel show (delete action) and swipe right reveal panel (other options)
I use the lib in a project where list items need to handle
The behavior is almost ok, but I still have an issue on usability between the longclick and the swipe events. Actually, if the finger is put on the item to perform a longclick event, this is very often the swipe event that is taken into account.
Are you aware of this behavior ?
I make a try with setMinFlingVelocity, but nothing really changed.
Looking at Gmail app, it seems it runs with a kind of horizontal offset before the swipe event is taken into account. Is there any way to do that with the lib ?
I set ViewBinderHelper.setOpenOnlyOne(true) for allow one item open. But not work correct!
I am using version 1.4.0 on Android 6.0.1 and the setOpenOnlyOne option doesn't seem to work.
I use Gradle to get the library as follows:
compile 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.0'
Then in my view holder I create the binderhelper and set the setOpenOnlyOne option as follows:
private final ViewBinderHelper viewBinderHelper;
viewBinderHelper = new ViewBinderHelper();
viewBinderHelper.setOpenOnlyOne(true);
I am using a RecyclerView and I can still slide all of the views open.
However
Hi,
I wanna set a clickListener for the swipeRevealLayout,
and when the swipeRevealLayout is closed and click it, call the clickListener.
Any suggestions ? :)
I looked into the documentation but I haven't found much.
I tried to set an empty SwipeListener and I looked if there was a "null" value for the dragEdge property. None of the solutions above worked.
Hi, I want to add buttons both side of list item in listview like accept and reject , But i found dragEdge should be any one how to achieve both side dragEdge .
Thank you for great lib!
I have a proposal. What do you think re inheriting the layout from, say RelativeLayout and handle margins in onLayout like this:
child.layout(
left + childParams.leftMargin,
top + childParams.topMargin,
right - childParams.rightMargin,
bottom - childParams.bottomMargin
);
?
Hi,
I used to update my list every half a second since I am updating data through streaming TCP connection.
During notifyDatasetChanged calling, if I try to swipe , it is giving a jerk and closes instead of opening.
How can I check the status is opening
Thanks for your good library!
I am doing doing a viewpager and one of the pages are populated with a list of SwipeRevealLayout items.
My problem is that a fast swipe on the SwipeRevealLayout item triggers the viewpager instead.
Is there a way to ensure that it is the SwipeRevealLayout item, that is triggered, also for fast swipe?
layout_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
context.xml (RevealLayoutItem)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_gravity="left"
android:gravity="left"
android:layout_margin="10dp"
android:background="@android:color/black"
android:layout_height="wrap_content"
android:layout_width="match_parent">
<com.chauthai.swipereveallayout.SwipeRevealLayout
android:id="@+id/swipe_layout"
android:layout_width="match_parent"
android:layout_height="82dp"
app:dragEdge="right"
app:mode="same_level">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="150dp"
android:background="#00FF00"
android:orientation="vertical"
android:showDividers="middle"
android:layout_margin="40dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Details" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_marginRight="100dp"
android:background="#ffffff"
android:orientation="vertical"
android:showDividers="middle">
<TextView
android:id="@+id/row1_col1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp"
android:text="Obligationslån, 5%" />
</LinearLayout>
</com.chauthai.swipereveallayout.SwipeRevealLayout>
</LinearLayout>
Is it possible to have SwipeRevealLayout which can be dragged from both left and right?
I still have an issue with incorrect height of menu item.
compile 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.0'
<com.chauthai.swipereveallayout.SwipeRevealLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:dragEdge="right"
app:mode="same_level"
>
<include
layout="@layout/layout_action"/>
<include
layout="@layout/layout_main"
/>
</com.chauthai.swipereveallayout.SwipeRevealLayout>
layout_action:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="@color/blue"
>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="@color/red"
android:drawablePadding="5dp"
android:drawableTop="@drawable/ic_close"
android:gravity="center"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:text="Delete"
android:textColor="@color/white"
android:id="@+id/action_delete"
/>
<View
android:layout_width="30dp"
android:layout_height="match_parent"
android:background="@color/green"
/>
</LinearLayout>
If we make a swipe for the first time without scrolling the recyclerview:
if we scroll first (and make this items to be recycled-reused):
How can i set drag sensitivity for swipe layout ? In the some devices (as Sony Xperia Z4), too difficult to click children in swipe layout.
I did try this:
mDragHelper = ViewDragHelper.create(this, 1.0f, mDragHelperCallback);
==> mDragHelper = ViewDragHelper.create(this, 0.1f, mDragHelperCallback);
But it still too sensitivity, so difficult to click to children view.
Thanks in advanced.
Click method won't work for any item in recycler view adapter. Only prints
ViewRoot's Touch Event : ACTION_DOWN
ViewRoot's Touch Event : ACTION_UP
how can I have the rows to readapt to the new width on rotation? I would like to avoid to handle the rotation event and redraw the whole list.
Is there a way?
thank you
ViewDragHelper: Ignoring pointerId=0 because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because ViewDragHelper did not receive all the events in the event stream.
If we choose a rounded view , then there is a gap between swipe and reveal layout.
I guess it could be fixed if we had the option to adjust the swipeable width of the layout so that they both overlap a bit.
Hi there,
Thank you for the library.
I have followed your example exactly to reveal a delete button on swipe, which works as anticipated. Except that even when the delete button is not in the foreground (i.e: it is under the main layout) and i click on that part of the foreground view, the list item gets deleted. Also, its a recycler view and I am not able to drill into the list item detail page when i click on the list item, it just deletes the item.
I think the delete button's visibility needs to be set to gone and should be made visible onSwipe of the layout.
Please any help at your earliest convenience will be much appreciated.
Hi, l add setOnClickListener in my adapter for convertView, when l click this item, nothing happen, only delete view get response.the code is:
holder.delete.setOnClickListener(new View.OnClickListener() {
@OverRide
public void onClick(View v) {
Toast.makeText(mContext, "position: " + position, Toast.LENGTH_SHORT).show();
}
});
convertView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(mContext, "position: " + position, Toast
.LENGTH_SHORT).show();
}
});
and xml is:
<com.chauthai.swipereveallayout.SwipeRevealLayout
android:id="@+id/swipe"
android:background="#F7F4F2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:dragEdge="right"
app:mode="same_level"
<LinearLayout
android:paddingTop="20dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#F7F4F2">
<ImageView
android:id="@+id/item_write"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:src="@mipmap/community_detail_comment_btn"/>
<ImageView
android:id="@+id/item_praise"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:src="@mipmap/community_detail_nice_btn"/>
<ImageView
android:layout_marginRight="15dp"
android:id="@+id/item_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:src="@mipmap/community_detail_delete_btn"/>
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
>
<TextView
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginLeft="20dp"
android:background="@color/common_lineColor"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingTop="22dp">
<ImageView
android:id="@+id/comment_item_praise_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/community_detail_nice_icon"/>
<TextView
android:id="@+id/comment_item_praise_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="11dp"
android:layout_toRightOf="@+id/comment_item_praise_icon"
android:text="13"
android:textColor="@color/common_textColor_93"
android:textSize="14sp"/>
<TextView
android:id="@+id/comment_item_username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginLeft="11dp"
android:text="God Love"
android:textColor="@color/common_textColor_93"
android:textSize="14sp"/>
</RelativeLayout>
<TextView
android:id="@+id/comment_item_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="22dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:text="contentcontentcontentcontentcontentcontent"
android:textColor="#474747"
android:textSize="17sp"
/>
</LinearLayout>
</com.chauthai.swipereveallayout.SwipeRevealLayout>
Plese help me...
Hello, I'm Natali.
I have some question about swiping item when RecyclerView starts scrolling.
When I starts scrolling list or try to click item pretty often item start dragging .
See small video.
https://drive.google.com/file/d/0B3hDpYmjmuijanZ0bDlvbjZPN2c/view?usp=sharing
May be I should config some option for SwipeRevealLayout to prevent dragging item or do item less sensitive to user touches? Please can you can help me?
Thanks
P.S. And thanks for your good library
how to perform onItemClick in ListView
Hello! I have a problem in Android 4.4.1 when I use notifydaSetChanged():
elements updating incorrectly. In Android 5+ It's work perfectly.
P.S. trouble in the binderHelper.bind(holder.swipeLayout, String.valueOf(position));
(If I comment out this line, everything will work fine in 4.4.1 (except swipe)
What I did wrong?
@Override
public void onBindViewHolder(PointViewHolder holder, int position) {
binderHelper.bind(holder.swipeLayout, String.valueOf(position));
if (position == 0) setupFirstItem(position, holder);
else if (position == points.size() - 1) setupLastItem(position, holder);
else setupAnotherItem(position, holder);
holder.tvAddress.setText(DataChecker.getCorrectAddress(points.get(position).getAddress()));
setupListeners(holder, position);
}
Hai
My Recycler view contains 50 items, and I want to allow my user to swipe only particular items.
for example, i need to disable swipe function for items at positions 10, 16, 25 but remaining positions can be swiped.
Is it possible?
I don't see any methods to do that, is it possible to programmatically open a row from the adapter?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.