View not updating dynamically
<p>I want to update a textview present in my project to be updated after a fixed time and want to show the changes on the screen/ui.As per debugging,the value of the textview is changing but the changes are not getting visible on the screen/ui.These are the xmls:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" &gt;

    &lt;LinearLayout
        android:id="@+id/wrapper"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" &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/bubble_yellow"
            android:paddingLeft="10dip"
            android:text="Hello bubbles!"
            android:textColor="@android:color/primary_text_light" /&gt;
    &lt;/LinearLayout&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>This one is the other xml:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" &gt;

 &lt;include
        layout="@layout/listitem_discuss" /&gt;

    &lt;ListView
        android:id="@+id/listView1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true" &gt;
    &lt;/ListView&gt;

&lt;/RelativeLayout&gt;
</code></pre>

<p>This is the main class:</p>

<pre><code>@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_discuss);
        random = new Random();
        ipsum = new LoremIpsum();

        lv = (ListView) findViewById(R.id.listView1);

        adapter = new DiscussArrayAdapter(getApplicationContext(), R.layout.listitem_discuss);

        lv.setAdapter(adapter);

        tv = (TextView)this.findViewById(R.id.comment);
        ll = (LinearLayout)findViewById(R.id.wrapper);

        addItems();
        ReduceTimeIteration();
    }

    public void ReduceTimeIteration() // checks after 2 minutes for any message to delete
    {

        try
        {
            final Handler m_handler = new Handler();
            m_handlerTask = new Runnable()
            {
                @Override 
                public void run() 
                {
                    String a = tv.getText().toString();
                    if(tv.getText() == "Hello bubbles!")
                    {
                                                   tv.setText("hi");                            
                    }
                    else{
                        tv.setText("hello");  // postInvalidate()
                        adapter.notifyDataSetChanged(); 
                    }
                    m_handler.postDelayed(m_handlerTask, 2000); 
                }
            };
            m_handlerTask.run();
        }
        catch(Exception e)
        {

        }
    }
    private String addItems() {
        String a = "Hello bubbles";
        adapter.add(new OneComment(true,a));
        return a;
    }
</code></pre>

<p>}</p>

<p>This the array adapter class:</p>

<pre><code>public class DiscussArrayAdapter extends ArrayAdapter&lt;OneComment&gt; {

    private TextView countryName;
    private List&lt;OneComment&gt; countries = new ArrayList&lt;OneComment&gt;();
    private LinearLayout wrapper;

    @Override
    public void add(OneComment object) {
        countries.add(object);
        super.add(object);
    }

    public DiscussArrayAdapter(Context context, int textViewResourceId) {
        super(context, textViewResourceId);
    }

    public int getCount() {
        return this.countries.size();
    }

    public OneComment getItem(int index) {
        return this.countries.get(index);
    }

    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.listitem_discuss, 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.bubble_yellow : R.drawable.bubble_green);
        wrapper.setGravity(coment.left ? Gravity.LEFT : Gravity.RIGHT);

        return row;
    }

    public Bitmap decodeToBitmap(byte[] decodedByte) {
        return BitmapFactory.decodeByteArray(decodedByte, 0, decodedByte.length);
    }

}
</code></pre>

<p>This is the class through which i am passing data into adapter:</p>

<pre><code>public class OneComment {
    public boolean left;
    public String comment;

    public OneComment(boolean left, String comment) {
        super();
        this.left = left;
        this.comment = comment;
    }
}
</code></pre>

<p>In this project,i want to update the value of textview tv in the main class.The value is changing actually,but not getting visible on the screen/ui.Please help me.Thanks in advance.</p>
