views:

52

answers:

2

dear friends,

i have created custom list view using

class EfficientAdapter extends BaseAdapter implements
{

private LayoutInflater mInflater;

        private Context context;


        public EfficientAdapter(Context context) {
            mInflater = LayoutInflater.from(context);
            this.context = context;
        }

        public View getView(final int position, View convertView,
                ViewGroup parent) {
            ViewHolder holder;

            convertView = mInflater.inflate(R.layout.adaptor_content, null);

convertView.setOnClickListener(new OnClickListener() {

                @Override
                public void onClick(View v) {
}
            });

}

and other necessary methods... also

}

using touch screen when i click on list item OnClickListener of list item is called.

but when i use Mouse Boll / Track Boll (Phone Hardware) to click on ListItem OnClickListener of list item is not called.

can any one guide me is this Phone bug or My Fault?

any help would be appriciated.

A: 

but when i use Mouse Boll / Track Boll (Phone Hardware) to click on ListItem OnClickListener of list item is not called.

Press the track ball to register a click. Roll the trackball to change the selection.

CommonsWare
sorry i dont understand..could you please elebrate it ?
UMMA
Take your thumb. Roll the track ball. You will see the orange highlight change position. This is *not* a click event -- it is a selection event. Then, with the orange highlight on some row, press down on the trackball to depress it into the device. This will register a click event on the selected row, as if you had tapped on it on the touchscreen.
CommonsWare
A: 

You can find information about this topic here:

http://groups.google.com/group/android-developers/browse_thread/thread/5696833388d162fd?pli=1

and here:

link to htp:/developer.android.com/reference/android/view/View.html

to analyze onTrackballEvent(MotionEvent)

i hope that it is useful

bye

1zartx0
it is only motion event not click :(
UMMA