Great you figured that one out! :-)

On Jun 27, 9:12 pm, Bara <[email protected]> wrote:
> I figured it out!  As it turns out, I have the ListView's visibility
> set to GONE by default.  I show the ListView in my OnClick event for
> my button.  When the orientation changes and the Activity gets
> destroyed and re-created, the ListView's visibility gets reset to the
> default set in the XML, GONE.  All I had to do was to set the
> visibility to VISIBLE in UpdateDisplay() and it all worked!
>
> Thanks to everyone for the help!  It is much appreciated, and I'll be
> sure to put all of your usernames in the About/Thank You section of my
> app :)
>
> Bara
>
> On Jun 23, 1:44 pm, Streets Of Boston <[email protected]> wrote:
>
>
>
> > thisListView.setAdapter(r_adapter);
> > r_adapter.notifyDataSetChanged();
>
> > If you do 'setAdapter', calling notifyDataSetChanged() is not
> > necessary, if i'm not mistaken. But calling an extra
> > notifyDataSetChanged() should hurt.
>
> > Override the adapter's getItem and getCount methods and put a break-
> > point in these methods. See if these get hit and, if they do, see what
> > values they return.
>
> > On Jun 22, 11:55 pm, Bara <[email protected]> wrote:
>
> > > Hmm... could it be my ArrayAdapter class causing the problem?
>
> > > This is how I call it:
>
> > > r_adapter = new ReminderAdapater(rData.getCurrentActivity(),
> > > remindersList, thisListView);
> > > thisListView.setAdapter(r_adapter);
> > > r_adapter.notifyDataSetChanged();
>
> > > And this is ReminderAdapater itself:
>
> > >     public class ReminderAdapater extends ArrayAdapter<Class_Reminder>
> > > {
> > >         ArrayList<Class_Reminder> items = new
> > > ArrayList<Class_Reminder>();
> > >         private ListView listView;
>
> > >         public ReminderAdapater(Activity activity, 
> > > ArrayList<Class_Reminder>
> > > items, ListView listView) {
> > >             super(activity, 0, items);
> > >             this.listView = listView;
> > >             this.items = items;
>
> > >             Log.i("ReminderAdapater", "Constructor; Size: " + 
> > > items.size());
> > >         }
>
> > >         @Override
> > >         public void add(Class_Reminder object)
> > >         {
> > >             Log.i("ReminderAdapater.add", "Item count = " + items.size());
> > >             super.add(object);
> > >         }
>
> > >         @Override
> > >         public View getView(int position, View convertView, ViewGroup 
> > > parent)
> > > {
> > >             //... some view related stuff here, but it never actually 
> > > gets to
> > > this point
> > >         }
> > >     }
>
> > > Do you guys see anything wrong with that?
>
> > > On Jun 22, 11:47 pm, Streets Of Boston <[email protected]>
> > > wrote:
>
> > > > The call to onRetainConfigurationChange and
> > > > getLastNonConfigurationInstance always works, if you have your
> > > > activity declared not to handle configuration changes by itself (which
> > > > it doesn't by default).
>
> > > > On Jun 22, 10:51 am, Gyan <[email protected]> wrote:
>
> > > > > Classic problem!
>
> > > > > Use a static variable rather than onRetainConfigurationChange() lot 
> > > > > of state
> > > > > data to be saved && doesn't work all the time!!
>
> > > > > Gyan- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to