Start converting mainactivity to java