Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8011051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:55:00+00:00 2026-06-04T18:55:00+00:00

I attempted to run Clean Code according to this link, however nothing is happening.

  • 0

I attempted to run “Clean Code” according to this link, however nothing is happening. From being a Renegade developer my intuition says “Button onClick” is missing but I could be wrong. Here is my code written according to what the instructions are:

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;

public class BuildingaSimpleUserInterfaceApi8Activity extends Activity {
    public final static String EXTRA_MESSAGE = "com.developer.android.com_training_basics_firstapp_building_ui.DISPLAYMESSAGEACTIVITY";

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
    /**This is how I work with Buttons and the Next Activity, however this method IS NOT defind
     * in the very first Android Tutorial for sending information onClick.
            Button bButtonone = (Button) findViewById(R.id.button_send);
            bButtonone.setOnClickListener(new View.OnClickListener() {
            public void onClick(View arg0) {
            // TODO Auto-generated method stub
            startActivity(new Intent("com.developer.android.com_training_basics_firstapp_building_ui.DISPLAYMESSAGEACTIVITY"));
                    }
                });
        }
       */   

    /** Called when the user selects the Send button */
    public void sendMessage(View view) {
        // Do something in response to button
        Intent intent = new Intent(this, DisplayMessageActivity.class);
        EditText editText = (EditText) findViewById(R.id.edit_message);
        String message = editText.getText().toString();
        intent.putExtra(EXTRA_MESSAGE, message);
    }
}

Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.developer.android.com_training_basics_firstapp_building_ui"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name=".BuildingaSimpleUserInterfaceApi8Activity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name="com.developer.android.com_training_basics_firstapp_building_ui.DisplayMessageActivity" />

    </application>

</manifest>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:55:01+00:00Added an answer on June 4, 2026 at 6:55 pm

    It looks like you forgot the line to start the activity:

    public void sendMessage(View view) {
        ...
        intent.putExtra(EXTRA_MESSAGE, message);
        startActivity(intent); // add me!
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Attempted translation of the above question from non-native English to English: This is a
I run a bat file to clean up and sometimes it takes a few
The following code works. However, it works because I end up creating a deep
I have attempted to start programming with OpenGl using this tutorial , and have
I'm currently trying to DRY up this initial verbose code: def planting_dates_not_nil? !plant_out_week_min.blank? ||
This is on a clean install of OSX 10.7 Lion. Here's the actions I've
When I attempt to run the following test in IntelliJ IDEA I get the
In attempts to test my models, im trying to run the following in rails
I attempted to re-size two buttons in MSIE, so they would be extra-large but
I attempted to render a circle in opengl es 1.1 as a test before

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.