Minor adjustments to the sample application.
Implemented the calculations for the toast position and size.