ListView, mark the position where the user touches

后端 未结 3 1110
谎友^
谎友^ 2021-01-17 00:53

I have a custom listview with a setOnTouchListener

view.setOnTouchListener(new OnTouchListener() {

        @Override
        publi         


        
3条回答
  •  离开以前
    2021-01-17 01:37

    What is the view in your case? Is it an individual list item or main listview ? If it is a listview, then try to handle the case

    case MotionEvent.ACTION_MOVE : 
    //Check position here, if it is out of your view, then change the color back.
    

提交回复
热议问题