0

I'm not even sure where to look to do this. I have an already made relative layout with buttons and textviews.

Is it possible to have top layer that the user can interact ( my relative layout) with transparent background

Then a bottom layer thats a background image thats scrolling. Thats outside of the control of the user. For example a scrolling image of space. Thats continually scrolling.

Thanks in advance

Hovanky
  • 303
  • 1
  • 3
  • 15

1 Answers1

0

Getting your root layout here it is --> RelativeLayout

Create animation file which consists of frame image files or transform | rotate | alpha whatever your animation is

Here the code looks like : Transform it on your needs-

animation file :: anim/push_down.xml

   <?xml version="1.0" encoding="utf-8"?>
   <animation-list xmlns:android="http://schemas.android.com/apk/res/android"
     android:oneshot=["true" | "false"] >
    <item
    android:drawable="@[package:]drawable/drawable_resource_name"
    android:duration="integer" />
   </animation-list>

Implementing inside the code

   RelativeLayout layout = (RelativeLayout) findViewById(R.id.layoutSearch);
   Animation a = AnimationUtils.loadAnimation(this, R.anim.push_down);
   a=setFillAfter(true); 
   layout.setLayoutAnimation(new LayoutAnimationController(a));
   layout.startLayoutAnimation();
Community
  • 1
  • 1
Vikalp Patel
  • 10,669
  • 6
  • 61
  • 96