scroll

checkboxes in the List randomly get checked/unchecked when i scroll through. android 2.3

旧城冷巷雨未停 提交于 2020-01-01 07:12:11
问题 I am using my custom adapter. There is a checkbox and a text view in each row. But i have a problem. There are more items in the list than the number which fits on the screen. So when i check any of the checkboxes on the screen and scroll down. The automatically get unchecked. When i scroll up again some random checkboxes get checked. I know that in getView() list is being refreshed again and again and theres an issue of the position. But dont know the solution. I have tried using a boolean

How to make a div stay at the bottom of another div that scrolls

删除回忆录丶 提交于 2020-01-01 06:54:09
问题 I have a div that is 400px high and it has content that scrolls inside. I have another div with an image inside, this div sits at the bottom of this parent div using position:absolute; bottom:0; but when I scroll it moves up the parent div with the content. I have used jQuery to change the position of the div to the bottom each time the user scrolls the parent div, this works but it jumps each time the div scrolls. Is there a way to do this with a smooth scroll? I would like it to just sit at

Scroll down to page, scroll up to top system like on a MEGA.co.nz download page

寵の児 提交于 2020-01-01 06:31:13
问题 var pagestart = 0; var currentlyat = pagestart; var lastScrollTop = 0; $(document).ready(function(){ function scrollPageTo(a){ if(a == 0){ $('#top').show(); $('#top').animate({ top: 0 }, 1000, function(event){ $('#page').css('top', $(window).height()).hide(); }); } else { $('#page').hide(); $('#page').animate({ top: 0 }, 1000, function(event){ $('#top').css('top', $(window).height()).hide(); }); } } if(pagestart == 0){ $('#top').css('height', $(window).height()); $('#page').hide(); } else { $

jQuery: scroll textarea to given position

情到浓时终转凉″ 提交于 2020-01-01 05:25:13
问题 I have a textarea with lots and lots of text: <textarea cols="50" rows="10" id="txt">lots and lots of text goes here</textarea> I want to scroll the textarea down, so the user can see 2000-th character. How can I do this using javasctipt/jQuery? $('#txt').scrollToCharNo(2000); // something like this would be great EDIT (my solution) Well, I managed to make it work myself. The only way I found, is to create a DIV with the same font and width as the textarea, put a SPAN near the needed

stop the page scrolling when selecting/dragging text

不问归期 提交于 2020-01-01 05:21:06
问题 I have a page where I do not want the user to be able to scroll. In order to prevent it, I just set the body to have a hidden overflow style. This is sufficient up until the point where a user tries to select some text and then drags to the bottom. The window then scrolls with the users dragging. How can I prevent this? 回答1: use position: fixed; . If you want the whole body to be non-scrollable: body { position: fixed; } EDIT: after receiving the comment from user Sam, I've decided to go back

How to make horizontal scroll on page

谁说我不能喝 提交于 2020-01-01 05:05:59
问题 I have div in which placed inner divs i need to make all inner divs in line and horizontal scrollbar should be displayed (i know it sounds crazy, but i need that). I tried container width auto and overflow scroll but nothing. How to accomplish that? my markup: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>text-overflow</title> <style> body{ width: auto; } #items{ overflow-x: scroll; width: auto; } .item{ display: inline-block; width: 400px; height: 100px; border:1px solid; } <

CSS: Disable bounce effect for scroll on iOS 13

人走茶凉 提交于 2020-01-01 05:04:09
问题 In Safari 13 release notes it is stated that there is no longer the need to apply the following to an element to enable the bounce scroll effect: div { overflow-x: scroll; -webkit-overflow-scrolling: touch; /* No longer needed */ } However, I can now no longer disable this effect with the following code: div { overflow-x: scroll; -webkit-overflow-scrolling: auto; } I need this for a carousel I am working on. Any idea on how to fix it? Thanks! 回答1: I think you should try to change that using

Stop scrolling in a listview

大城市里の小女人 提交于 2020-01-01 04:52:07
问题 I have in my activity a listview and an imagebutton. When I click the imagebutton I want to go to a specific position in the list (I do this by calling: setSelection(int position) on the list. The problem occurs when the user flings the listview and then clicks the imagebutton. The list goes to the specified position but continues scrolling. eg. when I go into fling mode, click the button, then I go to the fourth position, but the listview keeps scrolling, so I end up with a selection of 25

Touchend not firing after touchmove

拥有回忆 提交于 2020-01-01 04:43:05
问题 I'm trying to make a page for mobile devices that detects the scrollTop position and scrolls to the top of the page if scrollTop is lower than half the document height or scroll to bottom if its not. I have achieved that by using this: var ScrollTimeout; $(window).on('scroll',function(){ clearTimeout(ScrollTimeout); ScrollTimeout = setTimeout(scrollToTopOrBottom,200); }); The problem is that the timeout fires when the user has stopped scrolling but still has the finger on the screen. Then I

Bootstrap accordion scroll to top of active panel heading

跟風遠走 提交于 2020-01-01 04:28:06
问题 I'm looking for a code that scrolls up to the top of the currently active panel heading of my bootstrap 3 html/css accordion. The closest solution I've found on stackoverflow is the snippet of js below. This snippet works fairly well, but when a panel heading gets clicked the page scrolls such that the very top of the panel content is flush with the top of the screen. Is there a way to modify this so that the scrolling effect will result in the panel "heading" (as opposed to the top of panel