Is it possible to extend AbsListView to make new ListView implementations?

后端 未结 2 561
情深已故
情深已故 2021-02-03 17:24

I\'ve been looking at creating a stylistically different list view, like many other people, and I started by looking to extend AbsListView. Per the Android doc, AbsListView is:<

2条回答
  •  萌比男神i
    2021-02-03 18:14

    The post is circa 2010, but his assessment still holds true today. Certain necessary methods & fields are protected, in order to prevent future incompatibilities that could result from changing the internals of AbsListView.

    The best solution is still to copy the code for AbsListView into your project, along with necessary dependencies (the rabbit hole you mentioned).

    In the meantime, if you want to describe what kind of View you're trying to build, we might be able to point you in a direction that's slightly easier than creating your own AbsListView?

提交回复
热议问题