public class Demo extends Activity implements IvrJackAdapter {
private boolean bFirstLoad = true;
private ImageView imgPlugout = null;
private TextView txtStatus = null;
private TextView txtTotal = null;
private TextView txtDate = null;
//
private TextView lblEPC = null;
private TextView lblTimes = null;
private Button btnQuery = null;
//
private Button btnSetting = null;
private Button clearScreen;
private ListView epclist;
//
private ProgressDialogEx pd;
private boolean bSuccess;
private String cMsg;
private boolean bCancel = false;
private boolean bOpened = false;
private MHandler handler = null;
//
private CustomListAdapter seqAdapter;
private ArrayList<seqTag> seqArray = new ArrayList<seqTag>();
private ArrayList<String> tagArray = new ArrayList<String>();
private boolean bUpdateRequired = false;
public static IvrJackService reader = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//
imgPlugout = (ImageView)findViewById(R.id.imgPlugout);
btnQuery = (Button)findViewById(R.id.btnQuery);
btnSetting = (Button)findViewById(R.id.btnSetting);
btnSetting.setVisibility(View.GONE);
btnSetting.setOnClickListener(new View.OnClickListener()
{
public void onClick(View paramView)
{
if (bOpened) {
showToast("Please stop the inventory tag action.");
return;
}
Intent intent1 = new Intent();
intent1.setClass(Demo.this, activity_Setting.class);
startActivity(intent1);
}
});
lblEPC = (TextView)findViewById(R.id.textView1);
lblTimes = (TextView)findViewById(R.id.textView11);
txtTotal = (TextView)findViewById(R.id.txtTotal);
//
txtStatus = (TextView)findViewById(R.id.txtStatus);
txtDate = (TextView)findViewById(R.id.txtDate);
clearScreen = (Button) findViewById(R.id.btnClear);
clearScreen.setOnClickListener(new View.OnClickListener()
{
public void onClick(View paramView)
{
ListClear();
}
});
//
epclist = ((ListView)findViewById(R.id.tag_list));
epclist.setCacheColorHint(Color.TRANSPARENT);
epclist.setOnItemClickListener(new epclistItemClick());
seqAdapter = new CustomListAdapter(this, R.layout.customlistview, this.seqArray);
epclist.setAdapter(this.seqAdapter);
//
btnQuery.setOnClickListener(new btnQuery_Click());
btnQuery.setVisibility(View.GONE);
handler = new MHandler(this);
//
reader = new IvrJackService();
reader.open(this, this);