Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Created June 8, 2021 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeforfun-jp/c88cd28a9404ef4106e71a6ea5e76265 to your computer and use it in GitHub Desktop.
Save codeforfun-jp/c88cd28a9404ef4106e71a6ea5e76265 to your computer and use it in GitHub Desktop.
CTB 5-2
pink = findViewById(R.id.pink);
black = findViewById(R.id.black);
// Screen Size
WindowManager wm = getWindowManager();
Display display = wm.getDefaultDisplay();
Point size = new Point();
display.getSize(size);
screenWidth = size.x;
screenHeight = size.y;
orange.setX(-80.0f);
orange.setY(-80.0f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment