ScrollingTextView not working when clock is visible
<p>I have a TextView in my application which shows the current time, i implemented it like this</p>

<pre><code>private Handler handler = new Handler();


private Runnable runnable = new Runnable() 
{

public void run() 
{
   batteryLevel();
     if(clock_on == true) {


         Handler clockUpdate = new Handler(); 
         clockUpdate.postDelayed(new Runnable() { 
              public void run() {
                  executeClock();
              } 
         }, 500);



     }
     handler.post(this);






}

public void executeClock() {



    TextView timeTv = (TextView) findViewById(R.id.time);

    long currentTime=System.currentTimeMillis();
    Calendar cal=Calendar.getInstance();
    cal.setTimeInMillis(currentTime);
    String timeFormat24 = "%1$tH:%1$tM";   
 //   String timeFormat12 = "%1$tI:%1$tM";
    String showTime=String.format(timeFormat24,cal);
    timeTv.setText(showTime);


}
</code></pre>

<p>In my app i have a ScrollingTextView aswell, ScrollingtextView.java</p>

<pre><code>public class ScrollingTextView extends TextView {

public ScrollingTextView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
}

public ScrollingTextView(Context context, AttributeSet attrs) {
    super(context, attrs);
}

public ScrollingTextView(Context context) {
    super(context);
}
@Override
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
    if(focused)
        super.onFocusChanged(focused, direction, previouslyFocusedRect);
}

@Override
public void onWindowFocusChanged(boolean focused) {
    if(focused)
        super.onWindowFocusChanged(focused);
}


@Override
public boolean isFocused() {
    return true;
}
</code></pre>

<p>}</p>

<pre><code>&lt;com.doublep.example.ScrollingTextView
            android:id="@+id/txt_lcd_message"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:ellipsize="marquee"
            android:marqueeRepeatLimit="marquee_forever"
            android:scrollHorizontally="true"
            android:singleLine="true"
            android:textColor="#f82424"
            android:textSize="30dp" /&gt;
</code></pre>

<p>The ScrollingTextView doesn't work if the clock TextView is visible, when i make the visibility of the clock GONE then the ScrollingTextView works perfectly</p>

<p>Why is this happening?
How can i fix it?</p>

<p>EDIT: if i delay the clock the ScrollingTextView starts working, but as soon as the clock TextView gets set to the current time,  the ScrollingTextView stops working</p>

<p>UPDATE: after a bit of testing i noticed that the ScrollingTextView is working, but every time the executeClock() method runs, the ScrollingTextView animation gets reset and starts once again</p>
