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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:45:14+00:00 2026-06-10T18:45:14+00:00

I am stuck with writing a C# Mono for Android equivalent of following Java

  • 0

I am stuck with writing a C# Mono for Android equivalent of following Java event handler code:

public class Player extends ListActivity
{
    private ImageView list;//basically this is a buttona

    private void SetupButtonListeners()
    {
        list.setOnClickListener(new OnClickListener()
        {
             public void onClick(View v)
             {
                  //do stuff
             }
        });
    }
    /*
       more stuff here
    */
}

API REF: http://androidapi.xamarin.com/?link=T%3aAndroid.Widget.Button

  • 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-10T18:45:16+00:00Added an answer on June 10, 2026 at 6:45 pm

    There is no anonymous interface implementations in C# which is what you need according to documentaton:

    public virtual void SetOnClickListener (View.IOnClickListener l)
    

    Unless there is some helper classes already you need to write class that implements this interface and pass it in. If you can’t find existing one you should be able to create helper function that creates class and takes delegate as implementation of OnClick method.

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

Sidebar

Related Questions

How I'm stuck with writing a test for the following code. I want to
I am writing host code for a CUDA program, so I am stuck using
All, I'm writing a native application for Android and i'm stuck trying to acquire
I'm writing some C code to parse IEEE 802.11 frames, but I'm stuck trying
I've gotten stuck writing some parallel c code using OpenMP for a concurrency course.
Hello Fellow stackoverflowers, I´m stuck writing a piece of code. I have application with
I am writing a program and am stuck in the following requirement: The output
I'm writing a code generator and am getting stuck on determining the nullable status
I'm stuck writing jQuery validation for a contact form. I wrote a simple code
I am stuck in writing a Makefile when my source code files are across

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.