I need to implement a View, containing a RelativeLayout.
- The Width and Height of the parent should be absolute values.
- The child's Width and Height are either set to WRAP_CONTENT or an absolute value, but never to MATCH_PARENT.
- The child may be larger than the parent. If this is the case, only the part of the RelativeLayout which fitted in the parent View, should be visible, as in the picture below.
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?