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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:56:12+00:00 2026-06-01T06:56:12+00:00

Im trying to use a onclick method. My class has.. Public class Homework extends

  • 0

Im trying to use a onclick method. My class has..

Public class Homework extends Activity implements View.OnClickListner

And I have a method like this:

@Override
Public void onClick(View v){
Log.I(TAG, "Click");
}

But when I click on the view (which has click=true ) in the xml it doesn’t come up with anything.

When the view is pressed it is meant to log “click” using a normal click listener it work tho but I dont want to use heaps of listeners.

  • 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-01T06:56:14+00:00Added an answer on June 1, 2026 at 6:56 am

    Heve you set the onClickListener to that view?

    You have to write this snippet in your code

    View view = findViewById(R.id.your view id);
    view.setOnClickListener(this);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying use the onClick() function in an activity for an android app.
Hi I'm trying use a datepicker on a field I have. I'm trying to
Trying to use this method (gist of which is use self.method_name in the FunnyHelper
I am trying to use the JQuery on() method. Basically I am trying to
I am trying to learn how to use the AsyncTask class to authenticate the
I'm trying to use an AsyncTask-extended class to handle connecting to a URL, parsing
I am trying to implement a functionality similar to the onclick method of Javascript,
I am trying to use ajax like below; jquery code: $(a.generate).click(function(){ $.ajax({ data: {tag:
I'm trying to use scrolltop method and event.preventDefault is not working properly. What I'm
I am trying to use jquery on method on 1.7.2 but I am having

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.