Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. PrintPOS.connectWifi("192.168.10.87",9100);
  2.  
  3. Button btnGotovina = (Button)findViewById(R.id.Naruzba_btnGotovina);
  4. btnGotovina.setOnClickListener(new View.OnClickListener() {
  5. @Override
  6. public void onClick(View v) {
  7. if(listTrenutnaNaruzba.size() != 0) {
  8.  
  9. PrintPOS.PrintNaruzba(listTrenutnaNaruzba, new MyRunnable<Boolean>() {
  10. @Override
  11. public void run(Boolean s) {
  12. if (s) {
  13. listTrenutnaNaruzba.clear();
  14. adapterTrenutnaNaruzba.notifyDataSetChanged();
  15. txtUkupno.setText("0,00 KM");
  16. ukupno = 0;
  17. } else {
  18. txtUkupno.setText("ERROR se desio");
  19. Toast.makeText(getContext(), "Nije konektovan!! Provjerite da li je printer upaljen i probajte ponovo", Toast.LENGTH_LONG).show();
  20. PrintPOS.connectWifi("192.168.10.87",9100);
  21.  
  22. }
  23. }
  24. });
  25.  
  26.  
  27. }
  28. }
  29. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement