public void onDraw(Canvas canvas) { canvas.drawColor(Color.BLACK); Paint mPaint = new Paint(); mPaint.setColor(Color.WHITE); mPaint.setStrokeWidth(2); if(current_action != "done.") { canvas.drawText(current_action, (width/2)-(current_action.length()*5), height/2-10, mPaint); if(current_action.contains("Error")) { canvas.drawText(current_action, (width/2)-(current_action.length()*5), height/2-10, mPaint); try{ Thread.sleep(3000); }catch(Exception x){x.toString();} _run = false; try{ setContentView(R.layout.activity_main2); }catch(Exception x){ x.toString(); } } } Bitmap bitmap; GraphicObject.Coordinates coords; for (GraphicObject graphic : _graphics) { bitmap = graphic.getGraphic(); coords = graphic.getCoordinates(); canvas.drawBitmap(bitmap, coords.getX(), coords.getY(), null); } }
setContentView(R.layout.activity_main2);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)