Dev01
Dev01

Reputation: 4222

Android: Layout used by wechat

In WeChat, it uses white sections for different things as you can see in below image there are three white sections in it and each item is separated by a black line:

enter image description here

I can suspect this is not a ListView as one might think in first glance.

Question: Does anyone know is this some built-in component that can be used or how to go about creating similar sections ?

Upvotes: 0

Views: 356

Answers (2)

StoneBird
StoneBird

Reputation: 1940

I would say a linearlayout inside a scrollview with your custom listview and custom adapter is the most straightforward solution.

Each time the view is inflated you check the shared preference and fill in the info accordingly in your adapter. And on item click you open corresponding fragment/activity that do something. Then you issue a callback to refresh this settings view.

Might not be the most elegant way to do it. But I think this one is easy and clear.

Upvotes: 2

Mann
Mann

Reputation: 661

I guess its a preferences activity/fragment but you can create it with a listview, linearlayouts or a combination of a scrollview and a linearlayout. You have too many solutions ;)

Upvotes: 1

Related Questions