Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It is a deprecated answer to Android before <code>3.0</code> version, please uses SolArabehety's answer or look at <a href="https://stackoverflow.com/questions/3450839/blinking-text-in-android-view/11991435">this</a> thread.</p> <h1>Original Answer</h1> <pre><code>package teste.blink; import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.view.View; import android.widget.TextView; public class TesteBlinkActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); blink(); } private void blink(){ final Handler handler = new Handler(); new Thread(new Runnable() { @Override public void run() { int timeToBlink = 1000; //in milissegunds try{Thread.sleep(timeToBlink);}catch (Exception e) {} handler.post(new Runnable() { @Override public void run() { TextView txt = (TextView) findViewById(R.id.usage); if(txt.getVisibility() == View.VISIBLE){ txt.setVisibility(View.INVISIBLE); }else{ txt.setVisibility(View.VISIBLE); } blink(); } }); } }).start(); } </code></pre> <hr> <p> </p> <pre><code>&lt;TextView android:id="@+id/usage" android:layout_marginTop="220dip" android:layout_marginLeft="45dip" android:layout_marginRight="15dip" android:typeface="serif" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Google " android:textColor="#030900"/&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload