Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Created June 7, 2021 07:51
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/4d1e6dfe916e971aded12ecfdd08ca48 to your computer and use it in GitHub Desktop.
Save codeforfun-jp/4d1e6dfe916e971aded12ecfdd08ca48 to your computer and use it in GitHub Desktop.
CTB 3-2
startLabel.setVisibility(View.INVISIBLE);
boxY = 500.0f;
}
@Override
public boolean onTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
boxY -= 20;
}
box.setY(boxY);
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment