How adjust Android listview column width at runtime?
Does the Android listview has a method to ach开发者_运维百科ieve this goal?
I would like to implement the function like listview in C# or vb. There users can adjust the column width by themselves.
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
精彩评论