1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright 2014 Google Inc. All Rights Reserved. -->
3<!--
4This mess is all to draw a rectangle in the right place on the screen.
5Here's what's going on:
6    - Keyboard uses the intrinsic size of the drawable to work out where the drawable should be
7      centered in the key.
8    - Inset uses the intrinsic size of its inner drawable. This effectively scales the drawable
9      down to add padding, and doesn't make the drawable bigger.
10    - LayerList uses the maximum intrinsic size of its items as its intrinsic size.
11    - So, we use a LayerList with a blank shape that assumes the size of the keyboard key.
12    - We then add an inset with insetTop + insetBottom + inner shape = size of key.
13-->
14<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
15    <item>
16        <shape>
17            <size
18                android:height="@dimen/keyboard_key_height"
19                android:width="@dimen/keyboard_key_spacebar_width" />
20        </shape>
21    </item>
22    <item>
23        <inset
24            android:insetTop="@dimen/keyboard_spacebar_margin_top"
25            android:insetBottom="@dimen/keyboard_spacebar_margin_bottom"
26            android:insetLeft="@dimen/keyboard_key_spacebar_visual_horizontal_padding"
27            android:insetRight="@dimen/keyboard_key_spacebar_visual_horizontal_padding" >
28            <shape
29                android:shape="rectangle">
30                <size
31                    android:height="@dimen/keyboard_spacebar_height"
32                    android:width="@dimen/keyboard_key_spacebar_visual_width" />
33                <corners
34                    android:radius="@dimen/keyboard_spacebar_rounding" />
35                <solid
36                    android:color="@color/ime_foreground_spacebar" />
37            </shape>
38        </inset>
39    </item>
40</layer-list>