Thursday, 15 March 2012

android back botton make the application exist on real device -



android back botton make the application exist on real device -

i have welcome activity, if user press button, signin activity appear, when on emulator , press back, goes signin activity welcome activity, when on realy device , press back, programme existed, why please ?

give functions have on `signin` activity

public class signin extends activity implements onclicklistener { android.content.sharedpreferences somedata; // views edittext et_username, et_password; button b_signin; spinner s_type; textview tv_usernameerror, tv_passworderror, tv_signup, tv_forgetpassword; // string username, password, ip, filename = "mysharedstring"; protected void oncreate(bundle savedinstancestate ){} private string getip(){} private void initialize(){} public void onclick(view v){} edit

on welcome activity have function because want stop music when user press button

@override protected void onpause() { // todo auto-generated method stub super.onpause(); oursong.release(); finish(); }

calling finish() in onpause() cause activity end. cannot explain why working in emulator, remove phone call finish() onpause.

android android-emulator

No comments:

Post a Comment