How to achieve Wrap Text on Canvas in Android
<p>Hello I am trying to achieve wrap text in textview which is being drawn via canvas
Here is the code </p>

<pre><code>&lt;TextView
    android:id="@+id/textview01"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:ellipsize="none"
    android:textSize="50dp"
    android:scrollHorizontally="false"
    android:text="@string/hello" /&gt;
</code></pre>

<p>Here is the string.xml </p>

<pre><code>&lt;resources&gt;

&lt;string name="hello"&gt;Hello,How are you world whatsup Hello,How are you world whatsup Hello,How are you world whatsup Hello,How are you world whatsup &lt;/string&gt;
&lt;string name="app_name"&gt;GradientEffect&lt;/string&gt;
</code></pre>

<p></p>

<p>and here is the line where I am drawing it on the canvas and applying shader tweak for gradient</p>

<pre><code>String input=secondTextView.getText().toString();
    p.setShader(textShader);
    p.setTextSize(50);
    canvas.drawText(input, 100, 400, p);
</code></pre>

<p>But I am not able to achieve it ? </p>
