title: Designing thermometer in Android
body: <p>Have tried many ways to design a thermometer in android but they are all suck.</p>
  
  <p>The last work is using a vertical progress plus a circle.xml:</p>
  
  <p>drawable\verticalprogressbar.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt;
   &lt;item android:id="@android:id/background"&gt;
       &lt;shape&gt;
       &lt;/shape&gt;
   &lt;/item&gt;
   &lt;item android:id="@android:id/progress"&gt;
       &lt;clip
           android:clipOrientation="vertical"
           android:gravity="bottom"&gt;
           &lt;shape&gt;
               &lt;corners android:radius="50dip"/&gt;
               &lt;solid android:color="#FF0000"/&gt;
               &lt;stroke
                   android:width="1dp"
                   android:color="#000000" /&gt;
           &lt;/shape&gt;
           &lt;shape&gt;
               &lt;solid android:color="#FF0000"/&gt;
           &lt;/shape&gt;
       &lt;/clip&gt;
   &lt;/item&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>drawable\circle.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" &gt;
      &lt;solid android:color="#FF0000" /&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p>layout\activity_main.xml:</p>
  
  <pre><code>   &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="vertical" &gt;
  
          &lt;ProgressBar
              android:id="@+id/tempGauge"
              style="?android:attr/progressBarStyleHorizontal"
              android:layout_width="10dp"
              android:layout_width="100dp"
              android:layout_height="100dp"
              android:layout_gravity="center"
              android:max="50"
              android:progress="25"
              android:progressDrawable="@drawable/verticalprogressbar" /&gt;
  
          &lt;View
              android:layout_width="20dp"
              android:layout_height="20dp"
              android:layout_gravity="bottom"
              android:layout_marginBottom="10dp"
              android:background="@drawable/circle" /&gt;
  
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>What is the best way to draw a real mercury-like meter with this background:
  <a href="http://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Thermometer_CF.svg/345px-Thermometer_CF.svg.png" rel="nofollow">http://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Thermometer_CF.svg/345px-Thermometer_CF.svg.png</a></p>