Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PrintPOS.connectWifi("192.168.10.87",9100);
- Button btnGotovina = (Button)findViewById(R.id.Naruzba_btnGotovina);
- btnGotovina.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- if(listTrenutnaNaruzba.size() != 0) {
- PrintPOS.PrintNaruzba(listTrenutnaNaruzba, new MyRunnable<Boolean>() {
- @Override
- public void run(Boolean s) {
- if (s) {
- listTrenutnaNaruzba.clear();
- adapterTrenutnaNaruzba.notifyDataSetChanged();
- txtUkupno.setText("0,00 KM");
- ukupno = 0;
- } else {
- txtUkupno.setText("ERROR se desio");
- Toast.makeText(getContext(), "Nije konektovan!! Provjerite da li je printer upaljen i probajte ponovo", Toast.LENGTH_LONG).show();
- PrintPOS.connectWifi("192.168.10.87",9100);
- }
- }
- });
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement