简体   繁体   中英

HTC Hero Mouse BOll click not working on Custom ListView?

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM