I am implementing a custom horizontal scroll list. The Situation is like 
the attached image. I have a view, I detect the tap and everything.
Due to restrictions, I have to implement my own longClickListener by 
detecting a touch and creating a postDelayed runnable that perfomLongClick

//Start the runnable for long press

if (longClickRunnable == null){

longClickRunnable = new Runnable() {

public void run() {

if (touchMode == TouchMode.kTouchDown){

performLongClick();

endTouch(event);

}

longClickRunnable = null;

}

};

//Post long click runnable

postDelayed(longClickRunnable, ViewConfiguration.getLongPressTimeout());

}


In the attached image, the *scrolling view* (Adapter View) is the blue one, 
the *children views* are the grey ones, and each child has a* circular 
button*.


Now, my problem is the following, whenever I detect the long click, I 
change the status of the child views (editable -> true). And when that 
happens, the circle button visibility is set to View.INVISIBLE or 
View.VISIBLE. But for some reason, the child views WONT REFRESH, and the 
buttons won't show up. The buttons will only show when the view is reused 
after scrolling (just like in a list view)


However if I set the whole child to View.INVISIBLE they DO disappear when 
the long click is detected


I have tried requestLayout on children, also invalidate, postInvalidate, 
but I can't get it to work :\



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

<<attachment: problem.png>>

Reply via email to