实施多个微调器的最佳方法是什么? [英] What is the best way to implement multiple spinners?

查看:68
本文介绍了实施多个微调器的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道在列表视图中实现微调器的最佳方法是什么.我的情况是从服务器端获取产品名称,价格及其编号.为此,我将制作一个主活动(带有一个xml),其中将包含列表视图和一个单独的适配器类,以为列表视图和该适配器布局创建适配器.现在,我想问一问这种方法是否会很好,因为我将对微调框选择进行一些操作(获取每个微调框(或产品)的下拉编号,微调框(或产品)的名称和位置),而且我还必须处理微调框的位置作为getview()将每次呈现?还是你们向我建议了一些好主意呢?

I want to know that what will be the best way to implement spinner in a listview. My scenario is I am getting products names, prices and their number from server side. For this I am going to make one main Activity (with one xml) that will contain the listview and a separate adapter class to make the adapter for the listview and that adapter layout. Now I want to ask is this approach will be good as I will be having some operations on spinner selection (getting each spinner (or product) dropdown number, spinner (or product) name and position) and also I will have to handle spinner positions as getview() will render each time? Or you people suggest me some good ideas instead of this?

推荐答案

ListView中有许多微调框是可能的,但是我想在大多数情况下,这对用户来说不方便-过于混乱和移动的元素在彼此之上.我建议您为项目详细信息创建一个单独的Fragment,并且仅在ListView中显示静态项目,这会将用户带到项目详细信息片段(包括微调框和您可能需要的其他任何内容).看看这种设计模式:多窗格布局

Having many spinners in a ListView is possible but I would imagine in most cases it'd be inconvenient for the user -- too much clutter and moving elements on top of each other. I suggest you create a separate Fragment for item details, and only display static items in your ListView that will take the user to item details fragment (with spinners and anything else you might need). Take a look at this design pattern: Multi-pane layouts

这篇关于实施多个微调器的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆