Create and load an Ad without a layout XML

Merging code which can create and load an Ad using Java itself instead
of adding a layout XML entry as was done in my last commit.