Skip to main content

Posts

Showing posts with the label scroll

Jquery - Check: If scrollbar visible (div with overflow:auto)

is it possible to check the overflow:auto from a div? for example HTML <div id="my_div" style="width: 100px; height:100px; overflow:auto;" class="my_class"> * content </div> JQUERY $('.my_class').live('hover', function (event) { if (event.type == 'mouseenter') { if( ... if scrollbar visible ? ... ) { alert('true'): } else { alert('false'): } } }); Sometimes is the content short (no scrollbar) and sometimes long (scrollbar visible). Thanks in advance! Peter Source: Tips4all

ListView doesn"t stop on finger up?

I have a listView which defined like this in xml: <ListView android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="150dp" android:layout_x="4dp" android:layout_y="183dp" android:cacheColorHint="#00000000" android:fadingEdge="vertical" android:enabled="true" > </ListView> Everything's just fine, but in a strange way if user wants to scroll the list down to see other items and gets his finger up list turns back to top ? It's just not stopping where user scrolled... Why could it be happening? Thanks for help in advance...

Robotium side scroll not working for me

I want to scroll left/right on an android application using a Robotium/Junit test. There is a function in Robotium called: solo.scrollToSide(int); But, what do I put for the int? what is the value for RIGHT and what is the value for LEFT? I tried 0,1,2,3, and 4... no luck :( Thanks EDIT: I found the answer. RIGHT is 22 and LEFT is 21.