title: Marquee on TextView, blinking textview and Seekbar progress thread block the UI
body: <p>I have three animation working on my App.</p>
  <p><strong>1. TextView Marque (Scrolling continues)</strong></p>
  <p><strong>2. Blinking Textview (When my Music app in pause mode)</strong></p>
  <p><strong>3. SeekBar Progress thread (Shows the Progress of played song)</strong></p>
  <p>While i use above all effect for my app, then UI for my my app becomes little hang. I guess all are working on the UI thread. I want to handle it as like each work independently without blocking each other.</p>
  <p><strong>Code is like below:</strong></p>
  <p>XML layout for the app:</p>
  <pre><code>&lt;LinearLayout
      xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot; android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:paddingLeft=&quot;@dimen/activity_horizontal_margin&quot;
      android:paddingRight=&quot;@dimen/activity_horizontal_margin&quot;
      android:paddingTop=&quot;@dimen/activity_vertical_margin&quot;
      android:paddingBottom=&quot;@dimen/activity_vertical_margin&quot;
      android:background=&quot;@android:color/black&quot;
      android:orientation=&quot;vertical&quot;&gt;
  
      &lt;TextView
          android:id=&quot;@+id/songCurrentDurationLabel&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_weight=&quot;1&quot;
          android:paddingLeft=&quot;10dp&quot;
          android:singleLine=&quot;true&quot;
          android:text=&quot;00:00&quot;
          android:textColor=&quot;@android:color/white&quot;
          android:textSize=&quot;14sp&quot; /&gt;
  
  
      &lt;TextView
          android:id=&quot;@+id/songTitle&quot;
          android:layout_width=&quot;fill_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_gravity=&quot;center_horizontal&quot;
          android:layout_margin=&quot;10dp&quot;
          android:ellipsize=&quot;marquee&quot;
          android:fadingEdgeLength=&quot;10dip&quot;
          android:focusable=&quot;true&quot;
          android:focusableInTouchMode=&quot;true&quot;
          android:scrollHorizontally=&quot;true&quot;
          android:selectAllOnFocus=&quot;true&quot;
          android:singleLine=&quot;true&quot;
          android:textColor=&quot;@android:color/white&quot;
          android:gravity=&quot;center_horizontal&quot;
          android:textSize=&quot;30sp&quot;
          android:text=&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789&quot;/&gt;
  
  
  
  
      &lt;SeekBar
          android:id=&quot;@+id/songProgressBar&quot;
          style=&quot;?android:attr/progressBarStyleHorizontal&quot;
          android:layout_width=&quot;fill_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_marginLeft=&quot;-15dp&quot;
          android:layout_marginRight=&quot;-15dp&quot;
          android:layout_marginTop=&quot;15dp&quot;
          android:max=&quot;100&quot;
          android:progress=&quot;50&quot;
          android:progressDrawable=&quot;@drawable/scrubber_progress_horizontal_holo_light&quot;
          android:thumb=&quot;@drawable/scrubber_control_selector_holo&quot;
          android:indeterminate=&quot;false&quot; /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  <p><em>My Class code is like below:</em></p>
  <pre><code>public class MainActivity extends Activity {
  
      private Animation blinking_anim;
      private SeekBar songProgressBar;
      private TextView songCurrentDurationLabel;
      private int count = 0;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          blinking_anim = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.blinking_animation);
          songProgressBar = (SeekBar)findViewById(R.id.songProgressBar);
          songCurrentDurationLabel = (TextView)findViewById(R.id.songCurrentDurationLabel);
          songCurrentDurationLabel.startAnimation(blinking_anim);
          mHandler.post(mUpdateTimeTask);
          songProgressBar.setMax(10000);
      }
      private final Handler mHandler = new Handler();
      private Runnable mUpdateTimeTask = new Runnable() {
          public void run() {
              try {
                  Thread.sleep(100);
                  count = count +10;
                  songCurrentDurationLabel.setText(&quot;&quot;+ count);
                  songProgressBar.setProgress((int)count);
                  System.out.println(&quot;Runnnnn.........MAIN....&quot;);
                  if(count&gt;=10000){
                      mHandler.removeCallbacks(mUpdateTimeTask);
                  }else
                      mHandler.post(mUpdateTimeTask);
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
      };
  }
  </code></pre>
  <p><em>Blinking Animation:</em></p>
  <pre><code>    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;set xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;
      
      &lt;alpha android:fromAlpha=&quot;0.0&quot; android:toAlpha=&quot;1.0&quot; android:duration=&quot;1000&quot; android:repeatCount=&quot;infinite&quot;&gt;
      &lt;alpha android:fromAlpha=&quot;4.0&quot; android:toAlpha=&quot;0.0&quot; android:duration=&quot;1000&quot; android:repeatCount=&quot;infinite&quot;&gt;
      &lt;/alpha&gt;&lt;/alpha&gt;
  &lt;/set&gt;
  </code></pre>
  <p>Need help for implementing all this to work independently without hanging each other.</p>