java - Android SDK public void gets an error -
I have a problem by following the tutorial to create an app but now I get an error by adding an answer for a button . This gives an error on the public invalid sendMessage, but I can not see what is wrong.
package com.example.myfirstapp; Importroid.os.Bundle; Import android.support.v7.app.ActionBarActivity; Import android.view.Menu; Import android.view.MenuItem; Import android.content.Intent; / ** is called when the user clicks on Send Button / Public Zero Send Message (View View) {intent intention = new intent (this, DisplayMessageActivity.class); } Public Class Main Activity Extends ActionBarrow Activity {@ Override Protected Zero on Crate (Saved from Bundle Interstate) {super.onCreate (savedInstanceState); SetContentView (R.layout.activity_main); } @ Override Public Boolean On Crate Option Menu (Menu Menu) {// Expand Menu; It adds the item to the Action Bar if it exists GetMenuInflater (). Fluo (R. menu menu, menu); Back true; } @ Override selected public boolean on option Itam (Menuitm item) {// handles action bar items, click here Action bar automatically clicks the Home / up button, so // as long as you AndroidManifest.xml Specify basic activity. Int id = item.getItemId (); If (id == R.id.action_settings) {return true; } Return Super.Options item selected (item); }}
those rows
/ ** Is called when the user clicks on the send button * / public zip send message (see footage) {intention intended = new intent (this, DisplayMessageActivity.class);
The main activity of the public class after the ActionBarrow activation [
Comments
Post a Comment