back - mistake with finish an activity in android -


i have main activity 6 buttons. every button starts new activity. program worked after changed graphical attributes , made changes in theme mistake occurred . should press button 3 times return activity or exit main activity. suggestions?

btn_weeks.setontouchlistener(new ontouchlistener() { @override public boolean ontouch(view arg0, motionevent arg1) {     intent = new intent(mainactivity.this, weeks.class);     startactivity(i);     return false; } }); 

buttons should implements view.onclicklistener , not ontouchlistener.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -