Though this api is pretty basic and probaly would just work out of the box, this is no longer under development or maintained.
This is an API for Android Programmers.
Using this API you can make your TextView and Button text Glow with color of your choice.
// TextView which is to be glow
TextView textView;
// Create instance of Activity
MainActivity activity = this;
float startGlowRadius = 6f, // Glowing starts with this Intensity
minGlowRadius = 3f, // Minimum Glowing Intensity
maxGlowRadius = 15f; // Maximum Glowing Intensity
// Create instance of GlowingText
GlowingText glowText;
- Obviously you must do it inside OnCreate
glowText = new GlowingText(
activity, // Pass activity Object
getBaseContext(), // Context
textView, // TextView
minGlowRadius, // Minimum Glow Radius
maxGlowRadius, // Maximum Glow Radius
startGlowRadius, // Start Glow Radius - Increases to MaxGlowRadius then decreases to MinGlowRadius.
Color.BLUE, // Glow Color (int)
1); // Glowing Transition Speed (Range of 1 to 10) (fast ... slow)
And it starts Glowing ...
- method stopGlowing() should be called for each and every instance of GlowingText class.
@Override
public void onDestroy(){
super.onDestroy();
// Don't forget to use this.
glowText.stopGlowing();
}
// You can use these methods to change glowing attribute dynamically.
glowText.setGlowColor(Color.WHITE);
glowText.setStartGlowRadius(10f);
glowText.setMinGlowRadius(2f);
glowText.setTransitionSpeed(1);
// You can use following methods to retrieve current data
Log.d(TAG,"Current Glow Radius: " +glowText.getCurrentGlowRadius());
Log.d(TAG,"Max Glow Radius: " +glowText.getMaxGlowRadius());
Log.d(TAG,"Min Glow Radius: " +glowText.getMinGlowRadius());
Log.d(TAG,"Glow Color: " +glowText.getGlowColor());
Log.d(TAG,"Glow Transition Speed: " +glowText.getTransitionSpeed());