Comments (10)
That is because your row has a transparent background.
Make sure that you explicitly set the background of your row to a solid color (white in this case).
from swipeactionadapter.
Thank you for your answer, that worked. Another problem occurs when using static backgrounds which does not happen when the backgrounds are non-static. I get this exception: java.lang.ClassCastException: android.widget.AbsListView$LayoutParams cannot be cast to android.view.ViewGroup$MarginLayoutParams.
from swipeactionadapter.
Can you explain when you get this exception and maybe put the full stacktrace on a pastbin somewhere, so that I can have a look?
Are you manually setting layout parameters at some point?
from swipeactionadapter.
This exception occurs when I swipe right and want to start a new activity in onSwipe (I think). Here's the full stacktrace: http://pastebin.com/e7bzJgS8. I do not set the layout parameters manually anywhere in the application.
from swipeactionadapter.
The stacktrace doesn't contain a reference to this library, so my code isn't being called when this happens.
I'm guessing the exception happens when you release the swipe and the callback is fired. Maybe you're trying to do something fancy there?
from swipeactionadapter.
I am not doing anything different from when the background isn't static and then it works fine. The stacktrace doesn't reference my code either, which is confusing. If you don't know what the problem is I will simply have to try solving it on my own, thank you for the help anyway!
from swipeactionadapter.
I have tried removing all code from onSwipe() and I still get the same exception, and still only when fixed backgrounds is true. I can't figure out what is causing this, do you have any suggestions?
from swipeactionadapter.
I'm sorry, but I have absolutely no idea.
In both cases all the views are part of the same ViewGroup
. With translate backgrounds, they get translated off screen, while without they are just hidden.
If you can reproduce the issue on the sample app, I can take a closer look at it.
Otherwise all I can say is that you should use the debugger to figure out exactly at which point it goes down (or try to simplify your code until it goes away, which should help you pinpoint the offending code).
from swipeactionadapter.
I managed to solve it by keeping a loop going through all objects and only calling adapter.notifyDataSetChanged() in the method onSwipe(). If i remove this it crashes. I have not tried it with the sample app and therefore do not know if the same thing occurs there.
from swipeactionadapter.
It sounds like it's an issue with how you are managing your data in the adapter.
Potentially even a race condition, where you were trying to render something as you are removing it from the underlying adapter.
In any case I'm happy you managed to resolve it :-)
from swipeactionadapter.
Related Issues (20)
- NoClassDefFoundError HOT 3
- Have three textviews, and a image view, hence a custom listview HOT 2
- Action Mode for listview not working properly when I use SwipeActionAdapter HOT 1
- java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.view.View$OnTouchListener.onTouch(android.view.View, android.view.MotionEvent)' on a null object reference HOT 5
- Custom view HOT 1
- mAdapter.setFadeOut(true)
- Is there an undo action possible? If not already built in, what is the best way to get this implemented? HOT 1
- Not working with PullToRefresh HOT 2
- Problems with SwipeRefreshLayout HOT 1
- Issue with ExpandableListView HOT 1
- Using of SwipeActionAdapter with custom list of AutoCompleteTextView
- Render problem HOT 4
- Align of elements in background row HOT 2
- Mixed list HOT 3
- No way to stop animations HOT 1
- error when i try to filter my adapter HOT 2
- SwipeRefreshLayout touch events collide with SwipeActionAdapter
- Custom adapter HOT 1
- Cannot resolve method setListAdapter HOT 3
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 swipeactionadapter.