2

I would like to get a scroll effect to my background something like this http://dev.bradsknutson.com/demos/css-background-animation/

I have my LinearLayout that is matched on screen with a pattern background repeated on -x and -y but I don't know how to make scroll vertically.

korima
  • 306
  • 5
  • 12
  • http://stackoverflow.com/questions/15159171/how-to-marquee-images-in-android-automatically – Parth Kapoor Jul 04 '14 at 12:29
  • I appreciate your link but I'm still don't know how to make it because on them talk about ImageView where put different images but in my case I have only one LinearLayout, with a image background repeated and that must move up to down smothly. I don't know if I do not know if I've explained it better. – korima Jul 04 '14 at 17:26

1 Answers1

1

In the XML Use a relative layout. Create a custom view. Add custom view to relative layout. add linear layout over top.

In custom view, set up a thread to handle rendering, draw background bitmap to canvas at offsets using a deltatime, make sure to tile to fill in all gaps.

here are some links to get you started.

http://android-coding.blogspot.com/2011/05/drawing-on-surfaceview.html

http://www.anddev.org/novice-tutorials-f8/simple-surfaceview-example-t2174100.html

Android draw using SurfaceView and Thread

Community
  • 1
  • 1
WIllJBD
  • 6,144
  • 3
  • 34
  • 44