How to display text in a format

Question!
    display a text in format  

    email.setText(text);
  1. List item

    text="1. You won’t feel drained or tired if you drink fluids and have an honest meal." +"2. Donating blood won't leave you low of blood; in reality you still may have surplus blood even after donation." +"3. You will not faint or feel uncomfortable while donating blood. This is often a typical idea!" +"4. You will not get AIDS if you donate blood." +"5. If you want to consume alcohol, you'll be able to - on the consecutive day." +"" +"Share love and gift life to someone who needs it the most. Donate blood!";



Answers
in your resources do like the following :

<?xml version="1.0" encoding="utf-8"?>
 <resources>   
  <string        name="myMessage">1. You won’t feel drained or tired if you drink fluids and have an honest meal\n
2. Donating blood won't leave you low of blood; in reality you \n 
etc .. 
</string> 

</resources> 

then refer to it in the code in your activity like the following :

email.setText(getString(R.string.myMessage)); 

and please give me some feedback

Hope that Helps .



Basically \n will print content to next line. so use it like below.

email.setText(text);
  text="1. You won’t feel drained or tired if you drink fluids and have an honest meal."
            +" \n 2. Donating blood won't leave you low of blood; in reality you            still may have surplus blood even after donation."
            +" \n 3. You will not faint or feel uncomfortable while donating blood. This is often a typical idea!"
            +" \n 4. You will not get AIDS if you donate blood."
            +" \n 5. If you want to consume alcohol, you'll be able to - on the consecutive day."
+""
            +" \n Share love and gift life to someone who needs it the most. Donate blood!";


This video can help you solving your question :)
By: admin