Creating an adaptive application layout