title: Android Widget forcing RemoteView to clear cache?
body: <p>I'm developing a widget where the portrait and landscape layouts are saved in /layout and /layout-land respectively. each layout file is named the same, but has been modified for formatting changes based on their orientation differences.</p>
  
  <p>When I start a widget in one of the orientations and keep it there, it works fine...but the moment i switch orientations, the whole layout goes haywire.</p>
  
  <p>Now, after searching the web I have found out that the Android system loads the latest RemoteView from cache. Aka, if i started the widget it in landscape, the landscape layout gets cached and used when changing oritentation.</p>
  
  <p>I've tried everything I can think of to stop this from happening, but to no avail.
  Does anyone know if it is possible to clear the Android RemoteView cache and FORCE it load the corrected layout??</p>
  
  <p>Thanks</p>
  
  <p>EDIT:</p>
  
  <p>I have found a solution, albeit a bit hacky...</p>
  
  <p>I created a "wrapper" layout that only has a LinearLayout in it with an ID, and then created sub-layouts where the landscape versions have a _land at the end of the name.</p>
  
  <p>in the onUpdate method and the service that updates the widget, i check the orientation of the screen, then programatically select either the _land or non-_land version, and add it to the wrapper layout.</p>
  
  <p>I can't believe Google didn't make this easier to do, and its incredibly frustrating that I have to force such programatic behaviour out of something that should seem natural to do using XML configurations.</p>