Limit the Length of TextView
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3285412/limit-text-length-of-edittext-in-android">Limit text length of EditText in Android</a>  </p>
</blockquote>



<p>I am a textView on Activity, which is being displayed as per the parameter it is receiving from the JSON response, I need to restrict it to 12 characters only.</p>

<pre><code>&lt;TextView
    android:id="@+id/textViewName"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/includeheadersetting"
    android:layout_marginLeft="20dp"
    android:layout_marginTop="20dp"
    android:gravity="center"
    android:text="Name"
    android:textColor="#000000"
    android:textStyle="bold" /&gt;
</code></pre>
