Srollview question

parijs

Active Member
Licensed User
Longtime User
I place a panel with desinger on the panel a scrollview and on the scrollview a ImageView.
Everything works just the ImageView is standing still.

:sign0163:
 

thedesolatesoul

Expert
Licensed User
Longtime User
I place a panel with desinger on the panel a scrollview and on the scrollview a ImageView.
Everything works just the ImageView is standing still.

:sign0163:
Make sure you set ScrollView.Panel.Height to be large enough so it is scrollable.
In your case I think Scrollview.Panel.Height = ImageView.Height
but dont set the ScrollView.Height to be too big.
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
You can use the Designer to add a ScrollView to a layout but you cannot use the Designer to add any other View to the ScrollView.

All Views added to a ScrollView must be added in code.

Look at your layout in the Designer, select your ImageView and look at it's Parent property in the Designer.
You'll see that it's Parent is NOT the ScrollView.
It's Parent is likely to be the Activity itself or the Panel that you added to your layout.

So remove the ImageView from your layout and then in your code you need to create an ImageView and add it to the ScrollView.

Martin.
 
Upvote 0

parijs

Active Member
Licensed User
Longtime User
Hi,

My Scrollview is 150W and 280H and I see the scrollbar when scrolling
the Imageview is 100 x 100 but stand still
 
Upvote 0
Top