1

In my application, I have an TextView with many lines beside of product, but I need the data with proper appearance.Is it possible to have justified alignment dynamically?

Praful Bhatnagar
  • 7,425
  • 2
  • 36
  • 44
Neeha
  • 727
  • 3
  • 9
  • 21

3 Answers3

1

you can align your text dynamically some how as you want...

but, i guess there is no such facility available in android to fully justify text as the text editors does...

karan
  • 8,637
  • 3
  • 41
  • 78
  • watch...stackoverflow.com/questions/1292575/android-textview-justify-text?rq=1 – karan Apr 09 '13 at 07:33
  • for this purpose some programmers also use web view...refer this...http://www.seal.io/2010/12/only-way-how-to-align-text-in-block-in.html – karan Apr 09 '13 at 08:08
0

Use Html Formatting in your textView like

yourTextView.setText(Html.fromHtml("<h1>Product Name</h1><br><p>Content</p>"));
Arun C
  • 9,035
  • 2
  • 28
  • 42
0

Yes you can get the instance of TextView on activity startup

TextView t = (TextView)FindViewById(R.id.TextView1)
t.setTextAppearance(context,parameter)
Naga
  • 1,931
  • 4
  • 25
  • 42