Eclipse DisplayMessageActivity error -


i have question error in eclipse. eclipse says "the nested type displaymessageactivity cannot hide enclosing type"

this script:

package com.example.warzonegaming;

public class displaymessageactivity { public class displaymessageactivity extends activity {

    @suppresslint("newapi")     @override     public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);          // message intent         intent intent = getintent();         string message = intent.getstringextra(mainactivity.extra_message);          // create text view         textview textview = new textview(this);         textview.settextsize(40);         textview.settext(message);          // set text view activity layout         setcontentview(textview);            // make sure we're running on honeycomb or higher use actionbar apis         if (build.version.sdk_int >= build.version_codes.honeycomb) {             // show button in action bar.             getactionbar().setdisplayhomeasupenabled(true);           }     }      @override     public boolean onoptionsitemselected(menuitem item) {         switch (item.getitemid()) {         case android.r.id.home:             navutils.navigateupfromsametask(this);             return true;         }         return super.onoptionsitemselected(item);     } } 

}

does knows fix this, because can't go further now.

regards

try learn basics of javapackage com.example.warzonegaming;

public class displaymessageactivity extends activity {      @suppresslint("newapi")     @override     public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);          // message intent         intent intent = getintent();         string message = intent.getstringextra(mainactivity.extra_message);          // create text view         textview textview = new textview(this);         textview.settextsize(40);         textview.settext(message);          // set text view activity layout         setcontentview(textview);            // make sure we're running on honeycomb or higher use actionbar apis         if (build.version.sdk_int >= build.version_codes.honeycomb) {             // show button in action bar.             getactionbar().setdisplayhomeasupenabled(true);           }      @override     public boolean onoptionsitemselected(menuitem item) {         switch (item.getitemid()) {         case android.r.id.home:             navutils.navigateupfromsametask(this);             return true;         }         return super.onoptionsitemselected(item);     } 

}


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -