Scrollview nested listview and calculation method of nested height of listview

introduction

In Android development, we sometimes need to use the requirements of nested listviews in Scrollview. For example, there is a part of the information display area on the listview that displays information, and this part of the information display area is required to be slidable rather than fixed when there is more information in the listview. At this time, we usually nest Scrollview and listview together. However, this will lead to incomplete display of listview, and then there will be sliding conflict. Let's see how to solve it.

Solution

Actively calculate and set the height of the listview, so that the height of the listview can be displayed reasonably. The code is as follows:

The above calculation method of Scrollview nested listview and listview nested height is all the content shared by Xiaobian. I hope it can give you a reference and support more programming tips.

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
分享
二维码
< <上一篇
下一篇>>