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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:42:33+00:00 2026-05-18T05:42:33+00:00

I have a list in my app. When a user touches a list item

  • 0

I have a list in my app.

When a user touches a list item with their finger, the onListItemClick handler fires and I have it opening a new Activity.

However, when a user uses the trackball/pad to click, I want to perform some different functionality. I’ve overrode onTrackballEvent and everything works perfectly fine in the emulator’s trackball mode.

Unfortunately, when testing on the Samsung Moment, clicking the trackpad fires the onListItemClick handler, not the onTrackballEvent handler.

Does anyone know why? Does anyone have a way around this?

  • 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-05-18T05:42:34+00:00Added an answer on May 18, 2026 at 5:42 am

    In listview you can setOnKeyListener and do you code when keycode is KeyEvent.KEYCODE_DPAD_CENTER

    listview.setOnKeyListener(new OnKeyListener() {
    
                public boolean onKey(View v, int keyCode, KeyEvent event) {
                   switch(keyCode){
                     case KeyEvent.KEYCODE_DPAD_CENTER:
                        if(event.getAction()==KeyEvent.ACTION_UP){ //to do it only when key is released 
                       // do the code while trackball/pad is clicked
                        }
                       return true;
                     default:
                        return false;
                     }
                  }
             }
    });
    

    It work for me. Hope this will give you some idea

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

Sidebar

Related Questions

I've made a simple app, where I have a list of songs. The user
I have a list app where users hit the + button and enter in
Lets say I have some simple classes for a twitter-like app: User Post A
I have a simple rails app where user can send a mass email to
I have a List in my smalltalk application that gets updated by user events.
I have a grid of images/buttons, and I want the user to be able
I've been creating a list app and backing it with core data. I would
Problem Statement - Would like to know if particular web app user is active
I almost have facebook connect working the way I need it on my site,
This has probably been asked before, but I can't find a good way of

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.