disable trackball?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

disable trackball?

Postby mel » Fri Mar 20, 2009 1:42 am

Does anyone know how to disable the trackball in an Activity?

I have a class that extends from a ListActivity, and i want to disable the trackball that pass on the Items of the list because i don't like the color that gives the Focus of the trackball to the item of the list....

If there's no way to do this... there's any way of changing the color of the trackball focus item?

thx :)
Junior Developer
Junior Developer
Posts: 12
Joined: Thu Feb 12, 2009 6:53 pm


Postby MrSnowflake » Fri Mar 20, 2009 9:35 am

In Activity.dispatchTrackballEvent() return true.

But this is not the way you should handle it, because it will ruin the experience on non touch screen devices. You should make your own theme with another color for the selected items.
Though, I am very much against using different themes for applications, and every developer, who is developing to sell their apps publicly should too! Because a platform should deliver a consistent look-and-feel across the whole system. If you go around and make for every app you develop a different theme, then every app looks different and that can and will be unsettling for not so tech savvy users!

Btw: you are very much allowed to dislike the selection color, but you are not the boss of your users' phones (of course, unless, you are their boss and your app only needs to be on their phone :) ). So people should be able to make their own decisions about the theme of their phone and apps on it, when every developer starts using their own custom theme then users can't choose their own theme, because your fixed your theme upon them.
User avatar
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby carknue » Tue May 05, 2009 9:11 pm

How can I disable the trackball completly in my app? I use the dim.wakelock so that the screen is always on at dimmed brightness, but when I put the phone into a pocket, the trackball always wakes up the full brightness of the screen. So this code does not help me:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public boolean onTrackballEvent(MotionEvent event) {
  3.                  return true;}
Parsed in 0.032 seconds, using GeSHi
Once Poster
Once Poster
Posts: 1
Joined: Tue May 05, 2009 9:01 pm


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests