用Spinner填充ListVIew,帮助:/

时间:2016-04-12 02:36:14

标签: android android-layout listview android-fragments android-spinner

我目前正在使用我的应用程序。我正在开发一个食物跟踪器应用程序,基本上跟踪你消耗的食物。它有一个旋转器,里面装满了一系列物品“食物”。我的布局中除了每个标题“早餐,午餐,晚餐”之外的第一个微调器都有按钮,所以如果用户想要添加另一个食物条目,他们只需点击按钮添加另一个微调器“食品”。

这个问题是它超过了午餐,晚餐的文本视图。此外,用户将无法删除他们从微调器中选择的条目。

我的问题是我如何将它实现到每个早餐,午餐和晚餐只有一个微调器的位置以及保存条目的按钮,以便它可以填充在列表视图中而不是添加另一个微调器。我希望我有意义。这就是我到目前为止所拥有的。提前感谢你。

enter image description here

main_content.xml

{
  "condition": "AND",
  "rules": [
    {
      "condition": "OR",
      "rules": [
        {
          "id": "category",
          "field": "category",
          "type": "integer",
          "input": "select",
          "operator": "equal",
          "value": "2"
        },
        {
          "id": "category",
          "field": "category",
          "type": "integer",
          "input": "select",
          "operator": "equal",
          "value": "1"
        }
      ]
    },
    {
      "condition": "OR",
      "rules": [
        {
          "id": "price",
          "field": "price",
          "type": "double",
          "input": "text",
          "operator": "greater_or_equal",
          "value": "4000"
        },
        {
          "id": "price",
          "field": "price",
          "type": "double",
          "input": "text",
          "operator": "less_or_equal",
          "value": "5000"
        }
      ]
    },
    {
      "id": "name",
      "field": "name",
      "type": "string",
      "input": "text",
      "operator": "equal",
      "value": "Sample1"
    }
  ]
}

0 个答案:

没有答案