views:

392

answers:

1

Does the android listveiw has the method to achive this goal?

I woluld like to implement the function like listview in C# or vb,The users can adjust the column width by themselves.

A: 

I don't believe you can specifically set the width on a ListView element. That kinda defeats the purpose of Android's layout system. Similar to WPF, Android lays out its UI's in a fluid and dynamic way so that it can intelligently lay out all the children within a View based on their relationships. That's why views are added to layout containers. Maybe if you describe what it is you're trying to do, there might be a more Android-like solution than explicitly setting the width after the view has already been drawn or measured.

Here's a good link to read when thinking about Android layouts and views:

How Android Draws Views

Rich