Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make text glow?

Can we apply glowing effect to any text like shown below:

enter image description here

Updated: Please also tell me what things i need to create something like this:enter image description here

Do i need a Special font for this?

like image 364
Farhan Avatar asked Apr 17 '11 09:04

Farhan


People also ask

How do I make text glow in Powerpoint?

To view the glow and soft edges options: Select the object that you want to format. Under Drawing Tools, on the Format tab, click Shape Effects or Text Effects. Click Glow > Glow Options.


2 Answers

How about setting a blue shadow for the textview by using android:shadowColor and setting android:shadowDx and android:shadowDy to zero, with a pretty big android:shadowRadius?

like image 126
Bemmu Avatar answered Oct 11 '22 10:10

Bemmu


<TextView     android:id="@+id/glowingText"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:padding="5dp"     android:shadowColor="#cf1d1d"     android:shadowDx="0.0"     android:shadowDy="0.0"     android:shadowRadius="8"     android:text="Radioactive"     android:textColor="#cf1d1d"     android:textSize="20sp" /> 

i recommend to add a padding, because the shadow/glow effect increases the needed space.

For custom fonts create a folder with the name "fonts" in your assets folder. Then put your .ttf files inside it. You can convert .otf files online there are lots of websites.

Put this in your Class

Typeface myFont = Typeface.createFromAsset(getAssets(), "fonts/yourCustomFont.ttf"); 

and this is how you set the font to your textview

yourTextView.setTypeface(myFont); 

i have tested the glow effect and it works with custom fonts too. Keep in mind that you maybe have to decrease the size of your text because custom fonts are for some reason bigger. I used the half of the sp size that i normally would use.

like image 33
ORY Avatar answered Oct 11 '22 12:10

ORY