How to use

  1. Add as a library project
  2. Add xmlns:marijnvdwerf="http://schemas.android.com/apk/res-auto" to your layout xml
  3. Insert a <nl.marijnvdwerf.layouts.FixedAspectRatioFrameLayout /> view
  4. Set the aspect ratio by adding a marijnvdwerf:aspectRatio="1.77" attribute
  5. Specify in which direction the element should change size by adding marijnvdwerf:stretchMode="vertical"