In Android development, a swipemenulistview sideslip is recorded to delete disordered bugs

There are many schemes for sideslip deletion on the Internet, such as rewriting listview to realize sliding monitoring. Today, we talk about the next swipelistview, which is an encapsulated component opened by a friend on the Internet and can be applied to many situations. Project address: https://github.com/baoyongzhang/SwipeMenuListView , I also adopted the doctrine of taking and used it directly.

However, there was a problem during the sliding deletion of data during the debugging run. The deletion position was disordered. The first data deleted was the last one, so I found the problem. First, I tried with listview. The data was no problem, so it means that the calculation of the position of the deleted control was wrong during the deletion. First, I put forward two renderings.

So what's the problem? I read a previously submitted version (I remember that the previous use was good, indicating that it was a recently submitted problem, so I found a problem, that is, the getview method of swipemenuadapter class has more judgment than before. In order to cache the added, try to remove the judgment conditions and run it again. OK, some code is posted here.

The above is what Xiaobian introduced to you. During Android development, a swipemenuslistview sideslides to delete disordered bugs. I hope it will help you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>