update mainactivity.java

add a line code in mainactivity.java