nvanbenschoten / motion

An Android library allowing images to exhibit a parallax effect that reacts to the device's tilt
Apache License 2.0
776 stars 89 forks source link

set parallax image in background of layout to keep buttons and other controls #3

Closed Tawsif closed 10 years ago

Tawsif commented 10 years ago

How can we set Linear or relative layout background as parallax so that buttons and other controls can be placed on top of it

nvanbenschoten commented 10 years ago

You are not going to have much luck using a Linear Layout to stack views. Look into http://developer.android.com/reference/android/widget/FrameLayout.html for a much more effective method of stacking views within a single ViewGroup.

You could also check out the layout used in the sample application to get an idea of how this overlay is achieved.