Multiple pages in Eclipse android application -


i new in space working mini app. have animal images in main template , want when click example dog image must switch page , there dog description , image gallery. need know how create multiple pages , redirect it. app. ...

@override protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_main);      ////////////////////////  dog     button button3 = (button)this.findviewbyid(r.id.button3);     final mediaplayer dog = mediaplayer.create(this, r.raw.dog);     button3.setonclicklistener(new onclicklistener(){          public void onclick(view v) {              // if music playing             if(dog.isplaying() == true)                 // pause music player                 dog.pause();             // if it's not playing             else                 // resume music player                 dog.start();         }     }); 

you must create differents activity different pages. , use intent change page.

example :

intent intent = new intent(mainactivy.this, otheractivity.class); startactivity(intent); 

Comments

Popular posts from this blog

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

javascript - Chart.js - setting tooltip z-index -