Wang Liping--android project development and design ideas, self-summary, for reference only

Source: Internet
Author: User

Import-related

public class Mainactivity extends Activity {

Define all the controls you need

Private TextView TV


@Override
protected void OnCreate (Bundle savedinstancestate) {
Super.oncreate (savedinstancestate);
Set a full screen, or go to the title

Requestwindowfeature (Window.feature_custom_title);

Set up a layout file

Setcontentview (R.layout.activity_main);

Initialize related layouts

Init ();
}


If you initialize too much content, you can step-initialize
private void Init () {
Inittabhost ();
Inittitlebar ();
Initview ();
}

the specific initialization

private void Inittabhost () {}

private void Inittitlebar () {}

private void Initview () {

Tv_title = (TextView) Findviewbyid (r.id.tv_title);
Lv_local = (ListView) Findviewbyid (r.id.lv_local);

Imgbtn_local_del.setonclicklistener (Buttonlistener);

}

Listener Event Definition

Class Buttonlistener implements Onclicklistener {}


 

Wang Liping--android project development design ideas, self-summary, for reference only

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.