How to make the flickering text automatically open when activating, regardless of the View elements

Shimmer shimmer; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); shimmer = new Shimmer(); shimmer.start(); } 

This is a library of Shimmer-android

  • Do you mean this Shibmer Android ? - Barmaley
  • yes I have it, but I can't do it automatically - Bekenov-S

1 answer 1

Create your class inheriting from the class com.romainpiel.shimmer.ShimmerTextView , in which in the constructor with a delay is called:

 shimmer = new Shimmer(); shimmer.start(tv); 

For a delayed call, use postDelayed()

  • like doing shimmer.start (tv); namely id (swears inside the bracket) cannot determine - Bekenov-S
  • Duc, tv is a link to an object of type ShimmerTextView - Barmaley