Skip to content
Permalink
Browse files

Draw something in our window and find out the screen resolution of ou…

…r phone.
  • Loading branch information
avh4 committed Jan 15, 2013
1 parent b5a2718 commit 5d4de926ec4d26914166e0a07017ab11c341584d
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/com/example/ScorchedPocket/ScorchedPocketGame.java
@@ -9,4 +9,14 @@
public ScorchedPocketGame(Context context) {
super(context);
}

@Override
protected void onDraw(Canvas canvas) {
Paint redPaint = new Paint();
redPaint.setColor(Color.RED);
redPaint.setTextSize(20);

canvas.drawText("Width: " + getWidth(), 100, 100, redPaint);
canvas.drawText("Height: " + getHeight(), 100, 150, redPaint);
}
}

0 comments on commit 5d4de92

Please sign in to comment.
You can’t perform that action at this time.