<constantlayout>を使って、上側か左側に余白を指定できます。
正確に言うと、同一階層内のすべてのオブジェクトのx値あるいはy値を一律に同じ値で設定していることになります。
<?xml version="1.0" encoding="UTF-8"?> <canvas proxied="false" bgcolor="0xeeeeee"> <constantlayout axis="x" value="30"/> <simplelayout spacing="5"/> <view width="30" height="30" bgcolor="0xff0000"/> <view width="30" height="30" bgcolor="0x00ff00"/> <view width="30" height="30" bgcolor="0x0000ff"/> </canvas>
<?xml version="1.0" encoding="UTF-8"?> <canvas proxied="false" bgcolor="0xeeeeee"> <constantlayout axis="y" value="30"/> <simplelayout spacing="5" axis="x"/> <view width="30" height="30" bgcolor="0xff0000"/> <view width="30" height="30" bgcolor="0x00ff00"/> <view width="30" height="30" bgcolor="0x0000ff"/> </canvas>