Comments (3)
Created android issue.
from android-itemtouchhelper-demo.
Views must have a background for elevation shadows to show. Here's how you can do it by editing this project at b6d2464.
Add background to root view for item in item_main.xml
:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/item"
android:layout_width="match_parent"
android:layout_height="?listPreferredItemHeight"
android:background="@android:color/white" >
Then remove the background setting in ItemTouchHelperViewHolder
callbacks (or simply don't use it) in RecyclerListAdapter
(130, 135):
@Override
public void onItemSelected() {
// itemView.setBackgroundColor(Color.LTGRAY);
}
@Override
public void onItemClear() {
// itemView.setBackgroundColor(0);
}
from android-itemtouchhelper-demo.
@iPaulPro thanks, you're right. I'm confused that re-setting background disallows elevation shadow drawing and can't remember android-docs for this :(
from android-itemtouchhelper-demo.
Related Issues (20)
- Create lib and publish to Jcenter HOT 1
- Issue with getMoveThreshold() HOT 3
- ss
- Swipe to dismiss doesnt work on Grid layout manager?
- Change scrolling speed while drag-and-drop?
- How can we save the new list after drag? HOT 2
- swipe delete
- Single notification - onMove
- Click and drag images working together HOT 1
- How to resize the recyclerview layout with a header (grid)
- Position of item not getting changed when its moved
- XĂ m lol
- Cannot Update the position of the dragged file HOT 1
- How to do drag and drop with different view types? HOT 3
- Sorts are not equal
- disable swipe
- How to get below item at the time of dragging ? not UP or Down
- Able to drag (not drop) outside of Recyclerview or add DragShadow
- not working in navigation drawer HOT 1
- Drag & Drop works slowly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ď¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-itemtouchhelper-demo.