Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I set property of Textview like justify? [closed]

Tags:

I want to set TextView property like right align, left align, of justify

like image 592
Hitesh Dhamshaniya Avatar asked May 12 '11 10:05

Hitesh Dhamshaniya


People also ask

Which of the following is properties of TextView?

Properties of TextView in Android. android:id-ID is an attribute used to define a TextView uniquely. android: layout_height- Height is the attribute which is used to set the height of the TextView.

Which method is used to set the text in a TextView?

Set The Text of The TextView You can set the text to be displayed in the TextView either when declaring it in your layout file, or by using its setText() method. The text is set via the android:text attribute.

Can we change the text in TextView?

TextView tv1 = (TextView)findViewById(R. id. textView1); tv1. setText("Hello"); setContentView(tv1);

How do I align text in text view?

To align text in TextView at the center vertically and horizontally we need to make use of gravity attribute. Example 1 : You can use center_vertical | center_horizontal value to set the text at the center of the TextView area.


1 Answers

No, you can't set the property like gravity. But still you can set the justification to your text by taking webview instead of text view.

You may refer to this.

like image 73
Sanket Avatar answered Oct 04 '22 04:10

Sanket