Reputation: 531
I need to implement a View, containing a RelativeLayout.
Also, the RelativeLayout should be able to be moved and therefor change the visible part in the parent View. Unfortunately, Android doesn't let me do this. The child is allways clipped down to fit inside the parent.
I stumbled across ScrollView and HorizontalScrollView allready, but they allow the user to scroll around and that's not what I want him to be able to. There's just this too big RelativeLayout of which I want to show the user a just a part of.
Everything is added to the screen programmatically, without XML.
Is it possible? Maybe I haven't seen some obvios possibilities with ScrollView?
Upvotes: 3
Views: 702
Reputation: 7566
Try to set layout's clipChildren:false
http://developer.android.com/reference/android/view/ViewGroup.html#attr_android:clipChildren
Upvotes: 0
Reputation: 749
As you suggest you can use a ScrollView and disable scrolling in this view.
To do this read this answer:
Disable ScrollView Programmatically?
;)
Upvotes: 1