The problem appears in Android 2.2. It seems cool because it can auto-hide.But I don't like it quite much because the bar is an indicator for "Whether there is more content not present on the widget". Hiding it maybe neat, but may get the users wrong sometimes. In ListView, I find it a fatal bug at all. When there is more content to show, no scrollbar present, AND when wipe the screen down-wards, no scroolbar appears. Only when use the traceball or Dpad to move focus, there appears the scrollbar. BUT THERE IS WORSE: when you wipe down-wards to move the scrollbar down, nothing happens! The touch feature is almost disabled here.
Can anyone help me here? Thanks!
Maybe answers there will help you
Android ListView that does not scroll?
I had a listview inside of a scrollview. After I'd commented scrollview it was possible to use listview's scrolling.
The weird thing is, that this problem occurs only on Android 2.2.
I am using a listView in android 2.2 and it works just fine . The vertical scrolling happens implicitly without the inclusion of a scroll view . Hope your ListView id is #android:id/list.
And a small correction , to move down the list , you need to wipe the screen UPWARDS not DOWNWARDS ....
Related
I have a listview in a fragment that on a fast scroll, it jumps back to the top of the list. Sometimes it happens if you scroll really slowly too.
It seems to only happen on Galaxy Nexus and Galaxy S3, both of which are on 4.3. All other test devices we have are on 4.4 and they work fine.
I am seeing absolutely nothing in the logs when this happens, and am completely lost as to why this might happen.
I would post code, but there is a hell of a lot involved including animations on new items appearing and stuff. However, I've removed a lot of the code for animations and what not, with comments and I still get the list jumping back to the top.
Anyone experience this?
I might have stumbled upon a fix for that problem. I had a problem where fastScroll would bug out when some of the elements where set to hidden and it would scroll a bit and then jump back to top.
But after adding FooterView (empty one with paddingBottom: 16dp) to ListView would remove that jumping bug. Hopefully it helps you to fix it.
I am using a ListView with a WebView every 30 items for special HTML ads (animated) which are provided from a WebServer. This normally works okay. But sometimes it seems to draw the content of the WebView twice as seen in the screenshot below. The WebView continues animating but the misplaced (left bottom) drawing stays the same. When one interacts with the screen (scrolls) the wrongly drawn space disappears.
Now my questions are:
Why is this happening?
How can I prevent this from happening?
My current guess for Nr. 1 is: Somehow the WebView gets positioned in the left bottom just for a quick time where it as well draws. Then it gets positioned correctly but the ListView does not redraw that area because it thinks all is still at the same position.
Thanks to anyone who can help.
UPDATE:
I used the same WebView with the animation centered in a RelativeLayout. The same problem occurred there. So the problem is not in the ListView.
WebViews don't go well with ListViews, you may have to do a lot of hacks, including handling touch events, etc.
If you list doesn't display an 'infinite' list of items, or at least the list is never too big, you can maybe give a try on this custom listview from this other post: https://stackoverflow.com/a/21878703/684582
it was designed to support a ListView inside a ScrollView, but it might just help you on your problem without much redesign. I hope it helps! Good luck!
I found the problem in the WebView coming from the advertiser. The problem seems to be setting the LayerType to HARDWARE. That caused the Problem. Setting the the LayerType to NONE or SOFTWARE the problem went away. Now I just wonder WHY that caused the problem.
A normal WebView uses LAYER_TYPE_NONE by default.
Solution in short:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
I have an issue on my phone running Android 4.0.4.
I have an iframe with a text field and a couple of dropdowns, but the iframe is too wide to fit in the phone window when in portrait mode, so I get a horizontal scroll bar so I can scroll to see all of the fields.
The problem is, if I scroll the iframe to the right I can no longer select the text box or the dropdowns.
It looks like the device doesn't realise the iframe has been scrolled to the right, so for example, when the iframe first renders, the content is positioned left aligned. At this moment, one of the dropdowns is visible at the far right of the iframe. If I scroll the iframe all the way to the right and tap the screen where the dropdown used to be, I get the selection screen for the drop down even though the area of the screen I actually clicked had no element on it at all.
If I tap the screen where the dropdown actually is, I get no response at all.
I have a test page here:
http://snow.x10.mx/damian/page.html
Everything works fine on Firefox on the desktop, so it looks like it may be just an Android bug.
Can anybody suggest a workaround for it (other than making sure the iframe isn't wider than the screen) because I can't see an Android fix coming any time soon!
If anyone has an iPhone they can test it with, can you let me know if you have the same problem?
I've run into the same issue with Android 4.0.4
The same thing happens with vertical scrolling, and applies to input fields, links... Anything that should react to a touch/click event. If the element is visible before scrolling the position where it was is still reacting to the touch event after scrolling. And if it's not visible before scrolling there is nothing you can do to interact with that element.
I'm not sure what's causing this, but using a scrollbar plugin ( jScrollPane ) has solved it for me.
Good luck!
Good Evening,
i am having a problem with android 4.1 when it comes to scrolling and swiping. (I am using jquery mobile)
I have a list which you can delete items from by simply swiping to the right. When it comes to iOS, everything is really crisp. But it seems that android cant handle scrolling and swiping on the same element. You can only scroll in a 90° angle, but changing it to ~85° messes up the scrolling.
When i remove the swiping event, everything works fine. Is there a known fix for that?
Regards Dominik
$.event.special.swipe.scrollSupressionThreshold is the answer to that problem.
JqueryMobiel supresses scrolling when there is a swipe event on an item. Simply modify the values above to your liking and you'll be fine!
$.event.special.swipe.scrollSupressionThreshold = "30px";
30px is not the right parameter, it is 30 (without px), but 30px solves my problem.
As the title says I want to hide a listview's scrollbar when the listview isn't scrolling and show it when scrolling. I know this can be done very easy by setting "android:fadeScrollbars" as an application style if the API is 5 or newer. But I want the feature to be available on all android devices. So I've implemented the "setOnScrollListener" method, and switched the scrollbar visibility using the setVerticalScrollBarEnabled method. This works great on G2. The problem is that on Motorola Milestone the SCROLL_STATE_IDLE event isn't received when the scrolling stops, and so the scrollbar remains visible.
Thank you for reading!
Instead of using setOnScrollListener, I've used setOnTouchListener and switched the scrollbar's visibility at the MotionEvent.ACTION_DOWN and MotionEvent.ACTION_UP events.
Whatever I could have said as a solution has already been done by you.
Sorry!
but thanks a lot for posting that this particular Moto has this issue.