Does a visual activity have to have a layout?

aarondc

Member
Licensed User
Longtime User
I searched, but could not find the answer to my specific question.

If I am generating all views dynamically, do I have to have a layout? Or can I just add them to the activity, set their properties, and continue?
 

klaus

Expert
Licensed User
Longtime User
You can either create a layout and load it, add the views in the code or have a mixture of both.
The advantage of creating a layout is that you can easily set the different properties, without code, and see how it looks on a device or an Emulator. In the Designer you can add code in the DesignerScripts to manage different screen sizes.

Best regards.
 
Upvote 0

aarondc

Member
Licensed User
Longtime User
Thanks Klaus.

You raise a good point - can you do the DesignerScripts functionality via code? Or only the designer?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…