Design question regarding Adpater on GridView
<p>Hi have a GridView with my own Adapter class. This GridView displays TextViews as its items (simplified):</p>

<pre><code>@Override
public View getView(int arg0, View convertView, ViewGroup arg2) {           

    final LinearLayout linearLayout;          

    if (convertView == null) {  // if it's not recycled, initialize some attributes

        LayoutInflater inflater = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        linearLayout = (LinearLayout)inflater.inflate(R.layout.settings_timer_textview, null);
        TextView textView = (TextView)linearLayout.findViewById(R.id.timer_textview);
        textView.setText(text);     

    } else {
        linearLayout = (LinearLayout) convertView;
    }        

    return linearLayout;

}
</code></pre>

<p>How my the number of my TextView items and its text may change during runtime. That means, maybe at first I have 12 TextViews in my GridView but through the user configuration in another activity, there are only 10 TextViews left when the user returns to the GridView activity. How do I achieve such an update? If I just call notifyDataChanged() then getView is called but linearLayout != null and thus the text will not be updated (see code above - the else branch). Any ideas? Thanks.</p>
