what I want is like a gridView where every item could have its own width. Like in html if you just add a lot of span items inside a div block, the div will just grow as necessary to fit them.
Is there something already built for this purpose or should I try and create my own AbsListView implementation?
No, there is no such widget in Android.
Note that you would only extend
AbsListViewif you wanted individual items in the widget to be selectable. If you simply want a “flow layout”, you would extendViewGroupand create your own custom layout manager. There might already be an implementation of a “flow layout” available somewhere — people have asked about it for a long time.