How do I dynamically create a TextView with specified attributes?
<pre><code>&lt;TextView
    android:id="@+id/online_message"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:text="Onliners:"
    /&gt;
</code></pre>

<p>I want to create a <code>TextView</code> the same as the above by:</p>

<pre><code>android.widget.TextView.TextView(Context context, AttributeSet attrs) 
</code></pre>

<p>But how do I specify the <code>attrs</code> so that it represents the same attributes as the above?</p>

<p><a href="http://stackoverflow.com/a/4796124/104015">This answer</a> is close , but is there a way to read ONLY the attributes(no <code>TextView</code> tag in xml) and parse as <code>AttributeSet</code>?</p>

<p><strong>UPDATE</strong></p>

<p>I'm seeking of a way to construct <code>AttributeSet</code> programatically.</p>
