Hi everyone Happy Monday :smiley:. What’s the best...
# android
s
Hi everyone Happy Monday 😃. What’s the best solution for creating a static list, something like a settings screen, where the options don’t change? Is a ListView the best way to go, and then still setting up an adapter? My only hesitation is that it seems weird to wire up all this logic if the screen is basically static, but if that’s the only way (with an adapter) then that’s what I’ll do 👍🏻. (My mental model for layout construction is coming from xcode where I could basically do everything in the storyboard).
google 4
r
If the screen is static then I usually wouldn’t create an adapter.
👍 1
t
It depends on the number of options and the density of content for each item. For less that 5 items that are basically one-line text + icon, maybe you could use another navigation pattern (tabs, bottom nav) For more than 5 items (and potentially more in the future), using a ListView/RecyclerView whose content is backed by a constant Java List or an XML file seems easier to maintain.
👍 1
s
you could use epoxy, it abstracts out a bunch of boiler plate associated with recycler view adapter
👍 1
a
There's no analogous system to a static tableview in Android. You could just use a linear layout and manually add five items in. I would go with the recyclerview + adapter approach though.
👍 1
s
Ok thanks a lot everyone!