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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:46:15+00:00 2026-06-11T13:46:15+00:00

I am new to android programming & I’m trying to create a simple program

  • 0

I am new to android programming & I’m trying to create a simple program where I can handle drag & touch events on different shapes.

From the android API, I understand that it is easy to add event listeners to widgets(eg:ImageView). But how do I do the same for graphics such as RectF or Circle?

Since I’m a novice, I would appreciate if someone could explain in simpler terms.

  • 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-11T13:46:16+00:00Added an answer on June 11, 2026 at 1:46 pm

    Things like OnClickListeners can only be added to subsets of the View class.

    However, for shapes etc. you can override the onTouch() method for your base layout. Then in MotionEvent.ACTION_DOWN you get the coordinates of the touch point, and see if they intersect with any of your shapes. If it intersects with a shape, then the user clicked that shape, and you can implement whatever code you need to.

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

Sidebar

Related Questions

Hi I'm new to Android Programming and I'm trying to make a simple program
I'm new to programming for the android and I'm trying to create a simple
i'm new to android programming and i'm trying to create a relatively big 2D
I'm fairly new to Android programming. I'm trying to create an animation of a
I'm new to Android & Java programming but have been programming in .NET for
i am new to android programming and i am trying to develop an app
I am new to android programming and i am trying to develop this app
I'm new to Android programming. What is a simple example showing a custom toast
I'm new to Android programming. I spent a long time trying to look for
i am new to android programming and i want to create an api with

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.