java - How to switch between Activities? -



java - How to switch between Activities? -

how going sec activity 3rd or 3rd quarter using click of button. illustration have main menu 4 buttons, each sent me 4 activities, these 4 activities have buttons homecoming main menu , go other 3 activities.i know how go main activity another, have problems switch between activities not main activity. , greetings canary islands

this how start new activity activity button:

button b = (button) findviewbyid(r.id.button); b.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { intent = new intent(context, newactivity.class); startactivity(i); } }

dont forget declare new activity in manifest:

<activity android:name="your.package.newactivity" android:label="newactivity" />

java android android-activity android-lifecycle

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -