I have a text in each row that is small because it is too long because I set it to scroll To setMovementMethod () is set to textView but can not now be clicked on ListView. How do I solve this problem?
The getView () method from the editors is below I appreciate any answers, thanks in advance.
@ override public view getView (see the status of int, seeviewview, final view group origin) {last seeholder holder; If (convertView == faucet) {convertView = mInflater.inflate (R.layout.list_row, null); Holder = new viewholder (); Holder Name-label = (text view) ConvertViewfindVBIID (R. N. name); ConvertView.setTag (holder); Holder.nameLabel.setMovementMethod (ScrollingMovementMethod.getInstance ()); } And {holder = (seeholder) ConvertView.gettag (); } Return Convertview; }
I have been able to solve this problem. I implemented the intruder inside the adapter and set it to the text view. The reason for the touch event is this: I check that the touch event is a tap or swipe. If it is a swipe, then it will be swipe / scroll and if it is a tap, then I call the method used to see the list of click events.
@ Override Public Boolean On Touch (see V, Motion Event MotionEvents) {Switch (motionEvent.getAction ()) {Case MotionEvent.ACTION_DOWN: IIScrolling = Incorrect; MDownX = motionEvent.getX (); break; Case MotionEvent.ACTION_MOVE: float deltaX = mDownX - motionEvent.getX (); If ((Math.abs (deltaX)> mSlop)) // // Swipe was detected IIScrolling = true; } break; Case MotionEvent.ACTION_CANCEL: Case MotionEvent.ACTION_UP: If (MIsScrolling) {openNewScreen (v); // This method is used for ListView brakes click listener; } return false; }
Comments
Post a Comment