
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
com.github.brnunes:swipeablerecyclerview
Advanced tools
Implementation of an Android CardView list in a RecyclerView that allows dismissing elements by swiping them to the left or right
Based on romannurik`s Android-SwipeToDismiss.
Sample project implementation of a list of CardView
s in a RecyclerView
with a TouchListener
that allows dismissing of elements by swiping the elements to the left or right.
####How to use
Add these Gradle dependencies to your app's module:
dependencies {
...
// already includes 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.github.brnunes:swipeablerecyclerview:1.0.2'
// only necessary if you are using CardView
compile 'com.android.support:cardview-v7:23.1.1'
}
The RecyclerView
and CardView
widgets are part of the v7 Support Libraries.
Instantiate a SwipeableRecyclerViewTouchListener
passing as parameters the RecyclerView
and a SwipeableRecyclerViewTouchListener.SwipeListener
that will receive the callbacks.
Add the instantiated SwipeableRecyclerViewTouchListener
as a RecyclerView.OnItemTouchListener
.
SwipeableRecyclerViewTouchListener swipeTouchListener =
new SwipeableRecyclerViewTouchListener(mRecyclerView,
new SwipeableRecyclerViewTouchListener.SwipeListener() {
@Override
public boolean canSwipeLeft(int position) {
return true;
}
@Override
public boolean canSwipeRight(int position) {
return true;
}
@Override
public void onDismissedBySwipeLeft(RecyclerView recyclerView, int[] reverseSortedPositions) {
for (int position : reverseSortedPositions) {
mItems.remove(position);
mAdapter.notifyItemRemoved(position);
}
mAdapter.notifyDataSetChanged();
}
@Override
public void onDismissedBySwipeRight(RecyclerView recyclerView, int[] reverseSortedPositions) {
for (int position : reverseSortedPositions) {
mItems.remove(position);
mAdapter.notifyItemRemoved(position);
}
mAdapter.notifyDataSetChanged();
}
});
mRecyclerView.addOnItemTouchListener(swipeTouchListener);
FAQs
Implementation of an Android CardView list in a RecyclerView that allows dismissing elements by swiping them to the left or right
We found that com.github.brnunes:swipeablerecyclerview demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.