Overlay a custom view with an EditText
<p>The concept is very simple but I don't really know the best way to go about it.</p>

<p>I have a custom view that draws a speedometer. Over the top of this speedometer I want an <code>EditText</code>, centered in the middle vertically and horizontally with the width measured by speedometers diameter (etc). That last bit I can do, but where do I begin?</p>

<p>I already have the <code>EditText</code>:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/layout_comment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" &gt;

    &lt;EditText
        android:id="@+id/edittext_comment"
        android:layout_width="wrap_content"  
        android:layout_height="wrap_content" 
        android:inputType="text"
        android:imeOptions="actionDone" /&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>and my custom speedometer view (extends View). which is a good start!</p>

<p>How do I put them together?</p>
