I am struggling with a problem which in this moment I really cannot understand how to resolve. It is probably something stupid and very simple which I am overlooking.
In an activity I have a listview which is populated dynamically. Below the listview I have a scrollview with a panel and a label. The idea is that when a user clicks on an item in the listview some information is shown below in the label. I need a scrollview since the contents which needs to be written in the label can be very long. So far so good.
It looks graphically OK when the listview contains many items but when there is only one item in the listview, I get some empty space between the listview and the below scrollview. So when this happens, I want to move the scrollview upwards just below the listview to cover this empty space. No matter what I cannot get this to work. :BangHead:
I have posted a small project to simulate what I would like to do. Just run it and then click on the button. When the button is clicked I want the the scrollview to move up. Read my comments in the button-click event.
Anyone who can give me a helping hand? Maybe with some code-example if possible. Thanks.
In an activity I have a listview which is populated dynamically. Below the listview I have a scrollview with a panel and a label. The idea is that when a user clicks on an item in the listview some information is shown below in the label. I need a scrollview since the contents which needs to be written in the label can be very long. So far so good.
It looks graphically OK when the listview contains many items but when there is only one item in the listview, I get some empty space between the listview and the below scrollview. So when this happens, I want to move the scrollview upwards just below the listview to cover this empty space. No matter what I cannot get this to work. :BangHead:
I have posted a small project to simulate what I would like to do. Just run it and then click on the button. When the button is clicked I want the the scrollview to move up. Read my comments in the button-click event.
Anyone who can give me a helping hand? Maybe with some code-example if possible. Thanks.