using grid is good than listVIew for performance?

mc 3,481 Reputation points
2024-01-31T08:55:54.6033333+00:00

I mainly use it in android. should I use grid and add all controls manually or using ListView and set the datasource? for performance?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,630 questions
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 31,156 Reputation points Microsoft Vendor
    2024-02-01T02:29:23.4966667+00:00

    Hello,

    There isn't much difference between Grid and List performance in Android. This is because both views inherit from AbsListView in native Android and have the same rendering process, differing only in the layout.

    The only difference between a GridView and a ListView is that the ListView displays only one column; GridView can display multiple columns.

    As a result, deciding which layout to use is often related to the use case of the layout, not performance. If you need to display multiple columns, it is better to use Grid, and if you only need to display one column, it is better to use ListView.

    Best Regards,

    Alec Liu.


    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.


0 additional answers

Sort by: Most helpful