如何根据所附图形创建支持多种网格选择的布局? [英] How to create a layout as per the figure attached supporting multiple selection of grids?
问题描述
我想用来自服务器的数据创建这种UI. 假设我们有从服务器到字符串数组的美国州缩写列表.
I would like to create this kind of UI with the data coming from the server. Assume we have list of US states abbreviations coming from server into an a string array.
我使用gridView实现了这一点,并在视图中添加了一个适配器以适合美国的州缩写.现在,我需要在SearchBox中添加功能.每当我输入AL或任何文本时,网格布局应仅显示以AL开头的项目.
I implemented this using gridView and added an adapter to the view to fit the US state abbreviations. Now the thing I need add functionality in SearchBox. Whenever I type in AL or any text, the grid layout should display only the items starting with AL.
推荐答案
您可以通过任何方式动态创建视图.
You can create view dynamically anyhow.
请参见本示例. TableLayout是通过编程生成的.基于此,您还可以在同一个布局中创建按钮,例如forward,Go和Next.
See this Example. Where TableLayout is generated programmatic. Based on that you can also create the Button like forward, Go and Next to the same layout.
这篇关于如何根据所附图形创建支持多种网格选择的布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!