Table Of Contents
New in version 1.4.0.
This layout allows you to set relative coordinates for children. If you want absolute positioning, use the FloatLayout.
The RelativeLayout class behaves just like the regular FloatLayout except that its child widgets are positioned relative to the layout.
For example, if you create a RelativeLayout, add a widget with position = (0,0), the child widget will also move when you change the position of the RelativeLayout. The child widgets coordinates remain (0,0) i.e. they are always relative to the containing layout.
Changed in version 1.7.0: Prior to version 1.7.0, the RelativeLayout was implemented as a FloatLayout inside a Scatter. This behaviour/widget has been renamed to ScatterLayout. The RelativeLayout now only supports relative positions (and can’t be rotated, scaled or translated on a multitouch system using two or more fingers). This was done so that the implementation could be optimized and avoid the heavier calculations of Scatter (e.g. inverse matrix, recaculating multiple properties etc.)
- class kivy.uix.relativelayout.RelativeLayout(**kw)¶
RelativeLayout class, see module documentation for more information.