SimpleCursorAdapter adapter = new SimpleCursorAdapter (this, R.layout.mytaskslayout, cursor, new String[] {"Aircraft","Discrepancy", "ARR_FLT", "ARR_Gate", "DPT_FLT", "DPT_Gate"}, new int[] {R.id.ac, R.id.discrepancy, R.id.arrac, R.id.arrgate, R.id.dptac, R.id.dptgate});
这里有些值为null。我不想显示null但是TBD。我能在这做点什么吗(我不能改变SQL)
答案 0 :(得分:0)
遍历你的数组(填充listview),数组中任何等于null的值使它等于TBD
但是我看到你动态创建数组而不是数据库
new String[] {"Aircraft","Discrepancy", "ARR_FLT", "ARR_Gate", "DPT_FLT", "DPT_Gate"}, new int[] {R.id.ac, R.id.discrepancy, R.id.arrac, R.id.arrgate, R.id.dptac, R.id.dptgate}