android - Relative Layouts and Linear Layouts -
how embed tab layout within button. main layout linear layout, don't know how program main activity.java class. me started main.java code looks right now
import android.app.activity; import android.os.bundle; import android.view.view; import android.view.view.onclicklistener; import android.content.intent; public class remote_docactivity extends activity implements onclicklistener { /** called when activity first created. */ //private static final string tag = "remote_doc"; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); view patient_button = findviewbyid(r.id.patientbutton); patient_button.setonclicklistener(this); view doctor_button = findviewbyid(r.id.doctorbutton); doctor_button.setonclicklistener(this); view about_option = findviewbyid(r.id.aboutbutton); about_option.setonclicklistener(this); view exit_option = findviewbyid(r.id.exit); exit_option.setonclicklistener(this); } public void onclick(view v) { switch (v.getid()) { case r.id.aboutbutton: intent = new intent(this, about.class); startactivity(i); break; case r.id.exit: finish(); break; } } }
you can create tabs of tabactivity class. can take android-wireless-application-development book's unit 3 chapter 8 example.
Comments
Post a Comment