Update MainActivity.java

add code from github web