I am using a <marquee> tag for continues moving - marquee

I am using a tag for continues moving of image horizontally. Suppose I have a 5 images than it moving fine but after completion of last image move there is a big gap to start scrolling from 1 st image.How can i mange this?

Related

Animation with wxWidgets

In wxWidgets, is it possible to have on a wxPanel, an object that contains a mouse click event which moves the objects to another location when activated? The movement should be seen as an animation, e.g. Sliding from its initial location to the next location (Using wxTimer?). Is this by any means, possible?
Basically you need to change the position of whatever you are displaying smoothly so a timer at 25 Hz and then update the position a proportion of the movement each time, e.g. if you need to move from 0,0 to 100,200 smoothly in 4 seconds then updating your position by +1,+2 each timer event should do nicely. You may find that you need to invalidate a display area that includes the position before the move and after it to force a redraw but give it a try without first.

Remove 'hidden' images from UIScrollView

I have a scrollView that shows images set by url. Now I only want the visible image and the previous and next image to be pre-loaded onto the scrollView to reduce memory usage. How do I accomplish this?
If you use a UITableView instead of a UIScrollView, you can create your own UITableViewCell type which loads 1 image in its content.
The advantage is that only the visible UITableViewCells (those currently displaying on the device's screen) are loaded into the system memory, so it won't use too much resources.
Here is one of the many CustomCell Tutorials you will find on the Internet.
When I did the same I created a UIScrollView of 3 times the size. Just big enough to hold the 3 images, the one that is currently displayed and the next siblings to the right and the left.
Those images are pre-loaded if they have not been loaded before. So the user has some smooth and responsive look & feel.
When the user scrolls to the next one, and he can scroll for one only, then I re-arrange the view. Lets say images 1, 2 and 3 are in the scroll view and 2 is visible, so 1, 2 and 3 are (pre-)loaded. The user scrolls to the right. Image 3 will be visible. As soon as it becomes fully visible I set the visible rect of the scroll view to the middle again. Now Image 2 is the left most one, image 3 is visible and image 4 is placed as the right most one and pre-loaded.
When the end of the list of images is reached, meaning when the 1st or last one are displayed, then I place a dummy view on the left most or right most place respectivly that is a simple text view showing "no more images".
Unfortunately I cannot share that code.

UIWebview rotation+transform issues

When a user presses a button i add a scale transform to make it zoom out like safari's tabbing. when user presses the webview it comes back up. When the view is rotated, i use to get the values of how i wanted the frame to look like in tab mode, and checked if it was in tab mode when rotating and applied the frame. it works, and ive tried taking it out. The issue is, if i rotate like 10 times, a black line on the right side gets bigger and bigger going inside the webview. i have logged tons of objects for the web view and its scrollview to see if anything is off, the scrollinset/offset is correct, the frame is correct, the transform is correct too. i cant figure out why theres the black line. i tried refreshing the webview to see if its the webpage, and it doesnt fix that ether,the scale transform values is
CGAffineTransformMakeScale(0.6, 0.68)
for zoom out, and 1, 1 for zoom in. if anyone wants to see the effect just apply that to a uiwebview and start rotating the device about 10 times and you would then really see it.
heres how the web view looks when rotating a bunch of times:
on the right side theres that thick black line, it gets bigger with every rotate but ONLY grows when that transform is added, if its normal size again it stops but stays there.
When you transform any view, their frames do change, If you are using autoresize flag, check it since transforming changes frames and autoresizing also changes frames and this creates weird result.

How does the Reeder Mac app animate lists when switching folders?

Initially I was under the impression that it uses the table row slideup/down animations while inserting/deleting new rows but I doubt if it's doing that as it does it so fluidly even with thousands of items in the list (otherwise it would take a lot of time for the deletions/insertions to work).
Am I right in my assumption that it's simply attaching a new instance of the News list at the bottom of the screen, shrinking the above one while the one at the bottom expands to fill up space?
UPDATE:
Please see this video of what I mean: http://dl.dropbox.com/u/4960327/ReederAnim.mov
I can not tell you exactly how Silvio Rizzi made this, but as you see in the playback, a list view is added behind the shown list view, and the front list view fades out (.alpha = 0.0;) while the list view behind it expands its height per row.
When you desicate it frame by frame it becomes quite clear what he does, and it is really not that advanced. But I have to admit, with the white "milky" polished interface, it looks quite neat.
In addition, you can see that while animating, the background list view only renders the top 7 entries (hopefully calculated by dividing the view height with the average height of the cells shown) making the list view quick to load. Then afterwards, he can load an extended array of cells once you start scrolling, or in a background thread starting once the animation is complete.

New To Android Animation

I have three images which I want to move the images from one end to the other. When the first image goes beyond the window, it should start from the left side. It should run based on a timer.
What type of animation will be a perfect choice for this situation?
If each image is in an ImageView, you can use a TranslateImage on each one that is set to repeat infinitely (setRepeatCount(Animation.INFINITE), setRepeatMode(Animation.RESTART)).