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 8289413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:30:11+00:00 2026-06-08T12:30:11+00:00

I am new to Android development and Eclipse. I have been coding on ASP.Net

  • 0

I am new to Android development and Eclipse. I have been coding on ASP.Net and MS Visual Web Developer for years. In VWD, when you add a control to the design view, double clicking on it will automatically bring you to code view for the OnClick function of the control you have just created. You can also see the list of possible event handlers for a control from the design view.

But I can’t seem to find this feature in Eclipse. Is there such a thing? I did a search on Google and the best I found is this (same question but without an answer).

http://www.techrepublic.com/forum/questions/101-341077/event-handlers-in-eclipse

Anyone to advice please?

Thanks!

  • 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-08T12:30:12+00:00Added an answer on June 8, 2026 at 12:30 pm

    What you’re talking doesn’t quite exist in Eclipse. You’ll have to manually open your java class and add the method to the corresponding java activity there.

    For example, if you set the android:onClick XML attribute to “myAwesomeMethod” in your layout XML file, in the corresponding Activity that uses that layout, you’ll need to make sure you have a “myAwesomeMethod” method defined.

    <?xml version="1.0" encoding="utf-8"?>
    <!-- layout elements -->
    <Button android:id="@+id/mybutton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Click me!"
        android:onClick="myAwesomeMethod" />
    <!-- even more layout elements -->
    

    In your java Activity class:

    public void myAwesomeMethod(View v) {
        // does something very awesome
    }
    

    Note: you can also do this programmatically, which is what I generally do. However, defining the android:onClick method will save you a few lines of code.

    For more information, check out this post. It gives a lot more detail on how to assign onClick handlers to a button and the two ways you can do so.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to android development and I've been working on android through java(eclipse) till
I'm quite new to Android development (started 2 days ago) and have been through
I am new iOS development but I know android at eclipse. For example I
I am new to Android development. I have both Windows 7 and Mac OS
I am somewhat new to android development and development in general. I have a
I am new to android development. I have created a popup window which is
I'm new to Eclipse/Android development so I'm hoping this is something basic that I'm
I've been learning android development (in Eclipse) the past week. I'm following online courses
I am very new to Android development. I have this code: Button btnLaunch; btnLaunch=(Button)findViewById(R.id.btnLaunch);
I am new to Android and trying to setup Android Development Environment. I have

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.