2

我想在android中实现一个N级树结构。我已经浏览了 ExpandableListView,但它只适用于 2 或 3 个级别。我的要求如下...

CAR
|
|==Toyota
|     |
|     |==Sedan
|     |     |
|     |     |==Camry
|     |     |    |
|     |     |    |==Manufacture year
|     |     |    |==Body Colour
|     |     |    |    |
|     |     |    |    |==Black
|     |     |    |    |==Blue
|     |     |    |    |==Red
|     |     |    |    
|     |     |    |==Alloy Wheels
|     |     |    |==CD player
|     |     |    |==Petrol/Diesel
|     |     |    
|     |     |==Yaris
|     |          |
|     |          |==Manufacture year
|     |          |==Body Colour
|     |          |    |
|     |          |    |==Black
|     |          |    |==Blue
|     |          |    |==Red
|     |          |    
|     |          |==Alloy Wheels
|     |          |==CD player
|     |          |==Petrol/Diesel
|     |
|     |==Hatch Pack
|     |     |
|     |     |==Yaris
|     |          |
|     |          |==Manufacture year
|     |          |==Body Colour
|     |          |    |
|     |          |    |==Black
|     |          |    |==Blue
|     |          |    |==Red
|     |          |    
|     |          |==Alloy Wheels
|     |          |==CD player
|     |          |==Petrol/Diesel
|     |
|     |
|     |
|     |==Four Wheel Drive
|
|
|==Mazda
|
|    This section will have
|    same classification as above
|
|==Nissan
|
|    This section will have
|    same classification as above
|
|==Ferrari
|
|    This section will have
|    same classification as above
|
|==Hyundai
|
|    This section will have
|    same classification as above
|

您对在 Android 中实现这一点有什么建议吗?示例代码会更有帮助。提前致谢。

4

0 回答 0