To anybody responding to this.  I've actually figured out that the
problem is not that search doesn't know what directory to look in.
It's that if I do not go through the typical onDestroy()...onCreate()
cycle.  If I have already loaded a resource, that resource seems to be
held in memory somewhere, because menus I have not called yet will
show up correctly, but the ones I've already invoked once will not.
It seems a little strange since each time I'm inflating the view for
the menu I'm reinitializing the Dialog box I'm using with dialog=new
Dialog(); and making a call to dialog.setContentView(R.layout.xxxx)
where xxxx is my desired view.  I guess it must cache the view, or its
location in memory somewhere and not reinitialize until the
onDestroy()...onCreate() cycle runs.  Oh well, now that I've clarified
the issue.

If anybody knows how to get R to reinitialize its pointers to these
resources it would help quite a bit, because I've also found that
Android 1.6 has some very strange behavior where if you have run a
routine once when the onDestroy()...onCreate() cycle goes it makes
calls to that onMenuItemSelected routine which can lead to
nullPointerExceptions if you are referencing some things that have not
yet been initialized.  If I can avoid going through this cycle with
every orientation change it would help A LOT.

On Mar 17, 3:46 pm, Ben <[email protected]> wrote:
> I'm new to this group and I've got one thing that's been bugging me.
>
> In my application, I want to override the default reorientation from
> androids for two reasons:
>
> 1) my main view is animated and the redraw routine checks for changes
> in the screen height
>
> 2) It is faster to not reload everything again
>
> 3) My application allows users to decide what positions they would
> like things in, and I would like the positions to be proportional to
> the last position before the orientation switch, not in the default
> position  I know, onSaveInstanceState, but again it is faster to just
> let the refresh routine handle the changes.
>
> Anyway, I have a bunch of custom menus that reside in both the layout
> and layout-land folders.  I would like the program to take the proper
> menu based on that, but it doesn't.  So I'm looking for the method
> that is called somewhere between onCreate and onResume that tells the
> program which xml documents to use.  I don't really want to have to
> change the views programmatically, because that would create some
> extra overhead.  I also do not want to work around by creating two
> versions in the ./../layout folder--though this is the option I'm
> looking at right now.
>
> Any help is greatly appreciated!  and I've already searched through a
> lot of the Android Docs for this to no avail.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe from this group, send email to 
android-beginners+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to