我想在我的问题中增加“单位”的价值
public void fetchunit()
{
CardDatabase carddb =new CardDatabase(getApplicationContext());
carddb.open();
Cursor c=carddb.selectAll();
// c.moveToFirst();
c.moveToFirst();
int count = c.getCount();
Log.e("card", c.getString(0));
inflateRecord(c.getString(0),c.getString(1));
c.moveToNext();
unit=c.getString(0);
c.close();
carddb.close();
}
int count;
public void getunit()
{
CardDatabase carddb =new CardDatabase(getApplicationContext());
carddb.open();
Cursor c=carddb.getrecord(unit);
// c.moveToFirst();
// c.moveToFirst();
count = c.getCount();
Log.e("card", c.getString(0));
inflateRecord(c.getString(0),c.getString(1));
c.moveToNext();
c.close();
carddb.close();
}
当我调用 getunit() 时,“单位”中没有增量......所以当我调用 getunit() 时它总是给出相同的值
public void bottom2top(View v) {
// TODO Auto-generated method stub
switch(v.getId()){
case R.id.img3:
getunit();
break;
}
}
请建议我该怎么做...谢谢大家