I\'ve been a couple of days trying to solve this thing but I can\'t figure it out. The problem is, simple activity, with simple layout, ScrollView -> LinearLayout -> and a l
I have the same problem. I disagree that it's a fading scrollbar issue. If you disable the fading, the same thing happens.
Tried several approaches in themes.xml:
<item name="android:scrollbarDefaultDelayBeforeFade">100</item>
<item name="android:scrollbarFadeDuration">100</item>
<item name="android:fadeScrollbars">true</item>
But nothing helped. It seems that it's a system thing with scrollViews. This might help to see what's going on:
setOnScrollListener(new OnScrollListener(){
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
// TODO Auto-generated method stub
}
public void onScrollStateChanged(AbsListView view, int scrollState) {
// TODO Auto-generated method stub
if(scrollState == 0) Log.i("a", "scrolling stopped...");
}
});
}
But that (unfortunately) doesn't help in overcoming the problem - but rather explaining it.
NOTE: this only happens if you use ScrollView. ListView doesn't have this problem.
Anyone has another idea ?
Everything is behaving normally.
When you start scrolling, the ScrollView
will claim touch events until you stop touching the screen for a bit. In Android 2.2, you will know when scrolling is deemed complete, because the scrollbar on the right will fade away.
I've been able to fix this by overriding onScrollChanged, then sending the ScrollView a MotionEvent via OnTouchEvent when the bounds are reached to simulate a user touch.
It's the hackiest, dirtiest programming I can imagine, but it works ok in my application. This app is for phones running 2.2 only, and this bug needed to be fixed somehow.
If anyone has a better solution please let me know.
Edit: This problem is only in 2.2 btw, they've fixed it in 2.3, and it wasn't an issue in 2.1.
I got a situation like this. I have a ExpandableListView, it just behaves normally. When I rotate the cellphone to horizontal, and rotate back, then some items in one group of the ExpandableListView will not responding for click event. Unless I scroll the list view, or click the group item of these items, the event will dispatch to the items I clicked previously, and perform the click listener codes correctly.
This happened both in android 2.3 and 4.0...