title: how to set the seek bar thumb with a layout or with a TextView?
body: <p>i want my seek bar to look like this...<img src="https://i.stack.imgur.com/B9LHS.png" alt="enter image description here"></p>
  
  <p>the TextView should move with the thumb of seek bar...
  i tried with </p>
  
  <p>seek_needle.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical" &gt;
  
  &lt;TextView 
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:text=""
      /&gt;    
      &lt;ImageView 
          android:layout_width="25dp"
          android:layout_height="fill_parent"
          android:src="@drawable/seek_needle"
          /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and in mail.xml</p>
  
  <pre><code>  &lt;SeekBar
                  android:id="@+id/seekBar1"
                  android:layout_width="349dp"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:max="202"
                  android:layout_weight="80"
                  android:thumb="@Layout/seek_needle"                  
                    &gt;         &lt;/SeekBar&gt;  
  </code></pre>
  
  <p>for this application is crashing<br>
  please help me out...</p>
  
  <p>here is logcat output...</p>
  
  <pre><code>    09-11 17:50:23.582: I/dalvikvm(4142): threadid=3: reacting to signal 3
  09-11 17:50:23.762: I/dalvikvm(4142): Wrote stack traces to '/data/anr/traces.txt'
  09-11 17:50:24.062: I/dalvikvm(4142): threadid=3: reacting to signal 3
  09-11 17:50:24.212: I/dalvikvm(4142): Wrote stack traces to '/data/anr/traces.txt'
  09-11 17:50:24.582: I/dalvikvm(4142): threadid=3: reacting to signal 3
  09-11 17:50:24.632: I/dalvikvm(4142): Wrote stack traces to '/data/anr/traces.txt'
  09-11 17:50:24.664: D/dalvikvm(4142): GC_CONCURRENT freed 73K, 2% free 9435K/9607K, paused 7ms+8ms
  09-11 17:50:24.862: D/AndroidRuntime(4142): Shutting down VM
  09-11 17:50:24.872: W/dalvikvm(4142): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
  09-11 17:50:24.952: E/AndroidRuntime(4142): FATAL EXCEPTION: main
  09-11 17:50:24.952: E/AndroidRuntime(4142): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.audioscreen/com.example.audioscreen.MainActivity}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.audioscreen/com.example.audioscreen.Fm1Activity}: android.view.InflateException: Binary XML file line #63: Error inflating class android.widget.SeekBar
      09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.ActivityThread.access$600(ActivityThread.java:123)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.os.Handler.dispatchMessage(Handler.java:99)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.os.Looper.loop(Looper.java:137)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.ActivityThread.main(ActivityThread.java:4424)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at java.lang.reflect.Method.invokeNative(Native Method)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at java.lang.reflect.Method.invoke(Method.java:511)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at dalvik.system.NativeStart.main(Native Method)
  09-11 17:50:24.952: E/AndroidRuntime(4142): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.audioscreen/com.example.audioscreen.Fm1Activity}: android.view.InflateException: Binary XML file line #63: Error inflating class android.widget.SeekBar
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.ActivityThread.startActivityNow(ActivityThread.java:1797)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:682)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.widget.TabHost.setCurrentTab(TabHost.java:346)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.widget.TabHost.addTab(TabHost.java:236)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at com.example.audioscreen.MainActivity.onCreate(MainActivity.java:82)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.Activity.performCreate(Activity.java:4465)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     ... 11 more
  09-11 17:50:24.952: E/AndroidRuntime(4142): Caused by: android.view.InflateException: Binary XML file line #63: Error inflating class android.widget.SeekBar
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.view.LayoutInflater.createView(LayoutInflater.java:606)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.Activity.setContentView(Activity.java:1835)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at com.example.audioscreen.Fm1Activity.onCreate(Fm1Activity.java:24)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.Activity.performCreate(Activity.java:4465)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     ... 21 more
  09-11 17:50:24.952: E/AndroidRuntime(4142): Caused by: java.lang.reflect.InvocationTargetException
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at java.lang.reflect.Constructor.constructNative(Native Method)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.view.LayoutInflater.createView(LayoutInflater.java:586)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     ... 36 more
  09-11 17:50:24.952: E/AndroidRuntime(4142): Caused by: android.content.res.Resources$NotFoundException: File res/layout/seek_needle.xml from drawable resource ID #0x7f030008
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.content.res.Resources.loadDrawable(Resources.java:1923)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
  09-11 17:50:24.952: E/AndroidRuntime(4142):     at android.widget.AbsSeekBar.&lt;init&gt;(AbsSeekBar.java:70
  09-11 17:50:25.032: D/dalvikvm(4142): GC_CONCURRENT freed 797K, 9% free 9183K/10055K, paused 7ms+7ms
  09-11 17:50:25.203: I/dalvikvm(4142): threadid=3: reacting to signal 3
  09-11 17:50:25.232: I/dalvikvm(4142): Wrote stack traces to '/data/anr/traces.txt'
  09-11 17:50:25.642: I/dalvikvm(4142): threadid=3: reacting to signal 3
  09-11 17:50:25.662: I/dalvikvm(4142): Wrote stack traces to '/data/anr/traces.txt'
  </code></pre>