Comments (4)
SwappingHolder
works by swapping out the drawables of the top-level View
. CardView
uses its own drawables, so it will not work if you use it as the top-level View
.
I do not know of a way to fix SwappingHolder
to handle this, but you can fix it by wrapping the CardView
in a FrameLayout
.
from recyclerview-multiselect.
How do i wrap CardView
inside a FrameLayout
and doesn't CardView
extend FrameLayout
? Why wrap it again?
from recyclerview-multiselect.
Make it a child of a FrameLayout
, that's all I mean:
<FrameLayout
...
>
<CardView
...
>
</CardView>
</FrameLayout>
The problem is that CardView
uses its own background. SwappingHolder
needs to be able to replace that background to do its work.
Another option would be to implement the SelectableHolder
interface yourself, and choose how you want to display a selected item.
from recyclerview-multiselect.
FrameLayout
not only solved the above issue, this issue was also fixed -
Only the card that was long clicked used to appear( Problem was in lollipop only).
Listeners on each of the card's item is not working though, but i'm fine with this. I set listeners on the CardView
itself.
Thanks a lot man, appreciate your help.
from recyclerview-multiselect.
Related Issues (20)
- Null Object Reference error in onRebind method. HOT 2
- Disapearing CardViews + workaround HOT 3
- What is a white line appeared when I selected item ? HOT 2
- How to define the background of the selected item? HOT 2
- Please add onItemCheckedStateChanged listener HOT 4
- Support per-item selectability HOT 5
- FLAG_CHANGED has been removed from RecyclerView.ViewHolder(support 23.1.1)
- Error Crash When call multiselector.setselectable(false) after unselect all items in recycleview HOT 2
- Item ID is never used HOT 2
- NoClassDefFoundError: android/animation/StateListAnimator
- Animation error when leaving ActionMode while items are still selected HOT 2
- Why does a crash occur when getMultiSelector().clearSelections() is added to onDestroyActionMode? HOT 1
- menu actionbar show failed HOT 1
- Leaving selection mode (and action mode) if no item is selected HOT 2
- How to display number of item selected in context action mode bar
- Actionbar showing up black
- Adding filter functionality to multi-selector
- List with Image set Background selection mode
- Library is not AndroidX compatible HOT 2
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 recyclerview-multiselect.