change order of object in row of listview programmaticaly
<p>currently i have:</p>

<pre><code>    &lt;TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="15:22:33 \nApr 13 1999"
                        android:textColor="#FFFFFFFF" 

        android:textAppearance="?android:attr/textAppearanceSmall" /&gt;

    &lt;TextView
        android:id="@+id/comment"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_margin="5dip"
        android:background="@drawable/incoming_message_buble"
        android:paddingLeft="10dip"
        android:text="Hello bubbles!"
        android:textColor="@android:color/primary_text_light" /&gt;
</code></pre>

<p>and it work fine.</p>

<p>here is adapter code:</p>

<pre><code>public View getView(int position, View convertView, ViewGroup parent) {
    View row = convertView;
    if (row == null) {
        LayoutInflater inflater = (LayoutInflater) this.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        row = inflater.inflate(R.layout.activity_sms_row_layout, parent, false);
    }

    wrapper = (LinearLayout) row.findViewById(R.id.wrapper);

    OneComment coment = getItem(position);

    countryName = (TextView) row.findViewById(R.id.comment);

    countryName.setText(coment.comment);


    countryName.setBackgroundResource(coment.left ? R.drawable.incoming_message_buble : R.drawable.outgoing_message_buble);
    wrapper.setGravity(coment.left ? Gravity.LEFT : Gravity.RIGHT);

    return row;
}
</code></pre>

<p>i have to change order, for gravity left, i need shown textview comment first, and textView1 second
for gravity right, keep xml setting.</p>

<p>please advise.</p>
