Update MainActivity.java

collition detect