baron159 Member Licensed User Longtime User Mar 10, 2012 #1 How can you add buttons to a scroll view?
baron159 Member Licensed User Longtime User Mar 10, 2012 #2 In the designer. Is it Possible or no? I'm confused and trying to start a game. Upvote 0
klaus Expert Licensed User Longtime User Mar 10, 2012 #3 Have a look at the ScrollView examples summary there you find examples on how to populate a ScrollView. If you have a lot of Buttons it would probably be easier to add them in the code. In the Designer you can define a Panel that could be higher than the screen and add the Views. And load the layout file to the ScrollView.Panel Best regards. Last edited: Mar 10, 2012 Upvote 0
Have a look at the ScrollView examples summary there you find examples on how to populate a ScrollView. If you have a lot of Buttons it would probably be easier to add them in the code. In the Designer you can define a Panel that could be higher than the screen and add the Views. And load the layout file to the ScrollView.Panel Best regards.
baron159 Member Licensed User Longtime User Mar 11, 2012 #4 What would the code be to load the layout to ScrollView.Panel Upvote 0
NJDude Expert Licensed User Longtime User Mar 11, 2012 #5 Like this: Code: ScrollView1.Panel.LoadLayout("MyLayout") Upvote 0
baron159 Member Licensed User Longtime User Mar 11, 2012 #6 Where would i put this line of code under the: "Activity.LoadLayout("MyLayout") Upvote 0
NJDude Expert Licensed User Longtime User Mar 11, 2012 #7 You will need 2 layouts, one, containing the scrollview which will be loaded to the activity and the other layout that will be loaded to the scrollview, take a look at the attached project. Attachments ScrollViewSample.zip ScrollViewSample.zip 7.2 KB · Views: 333 Upvote 0
You will need 2 layouts, one, containing the scrollview which will be loaded to the activity and the other layout that will be loaded to the scrollview, take a look at the attached project.