Hello,
How to set the row width of listview in xamarin android
You can do this by setting a fixed value for Listview's layout_width
. Such as android:layout_width="300dp"
If you set android:layout_width="wrap_content"
. ListView will be as wide as the widest of its children. ListView must therefore measure its items and to get the items it has to call getView() on the Adapter. This may happen several times depending on the number of layout passes, the behavior of the parent layout, etc. It will run lots of times getView() on the Adapter. You should implement getView() to be as efficient as possible.
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.