Skip to content

Android SquareLayout Library How to use

ronaldsteen edited this page Sep 27, 2011 · 2 revisions

My SquareLayout library is an extension of LinearLayout that takes a specified width, for example "fill_parent", and adjusts its height to correspond its width, resulting in a layout with square dimensions.

To use this library 1) get the sources, 2) include the library in your project, 3) specify a SquareLayout in your layout.

layout example:

<nl.tamtam.widget.squarelayout.SquareLayout
    android:orientation="vertical" android:layout_width="fill_parent"
    android:layout_height="1dp" android:height="1dp">

    <!-- contents of your layout -->
</nl.tamtam.widget.squarelayout.SquareLayout>
Clone this wiki locally