这是我的编码,我想从listview打印。所以请告诉我如何打印。 如果您使用sqlitedatabase使用listview打印代码,请告诉我解决方案
final myDBClass myDb = new myDBClass(this);
final ArrayList<HashMap<String, String>> SavedData = myDb.SelectAllCTRNSDATAforSaved();
listView1 = (ListView)findViewById(R.id.listView1);
// List for chit collection
final SimpleAdapter sAdap;
sAdap = new SimpleAdapter(EODReport.this, SavedData, R.layout.column_today_collectedlist,
new String[] {"FC_GR", "FC_TN", "FC_AMR", "CT_NAME"}, new int[] {R.id.fc_group, R.id.fc_tn, R.id.fc_amr, R.id.fc_name});
listView1.setAdapter(sAdap);
private void senddatatodevice() {
try {
mbtOutputStream = mbtSocket.getOutputStream();
switch (mPrintType) {
case 0:
byte[] Command = { (byte) 0x09, FontStyleVal };
mbtOutputStream.write(Command);
byte[] send = line.getBytes();
mbtOutputStream.write(send);
mbtOutputStream.write(0x0D);
mbtOutputStream.flush();
break;
default:
break;
}
// outstream.write(0);
// mbtOutputStream.close();
// mbtOutputStream.flush();
} catch (IOException e) {
e.printStackTrace();
}
}