title: How to maintain the data even when the mode is changed from portrait to landscape and vice versa?
body: <p>I have 25 <code>edittexts</code> and other views on my activity. I have created different <code>main.xml</code> files in <code>layout</code> and <code>layout-land</code>, so the respective <strong>UI</strong> will be displayed according to the <strong>switched mode</strong>(either <strong>portrait</strong> or <strong>landscape</strong>).</p>
  
  <p>But After filling values in the <code>edittexts</code>, if I change from the <strong>portrait</strong> to <strong>landscape</strong>, the previous values are <strong>lost</strong>. So, my doubt is how to <strong>get</strong> the values from the <code>edittexts</code> and <strong>restore</strong> the values at their respective <code>edittexts</code> even after <strong>changing</strong> to other mode.</p>
  
  <p>Of course I know when we <strong>switch</strong> modes, the activity is <strong>recreated</strong> which results the <strong>data loss</strong>. I have revised even <code>Handling Runtime changes</code> in the developer guide, but as a newbie I am unable to understand clearly like <code>onRetainNonConfigurationInstance()</code> method to save data as it returns object, but in my app I need the numbers that are entered in the <code>edittexts</code> to be on their respective <code>edittexts</code> even after <strong>switching</strong>. </p>
  
  <p>Have referred lot of questions like <a href="https://stackoverflow.com/questions/5913130/dont-reload-application-when-orientation-changes" title="optional title">link</a> etc., even on <strong>stackoverflow</strong>, but I am unable to find solution for my problem. Please suggest the solution for this.</p>
  
  <p>Even I have another problem. I have a <code>dialog</code> which pops up when this <code>activity</code> is first started and I don't want this too to <code>popup</code> while <strong>switching</strong> modes. Please suggest the solution for these two. If anyone needs code snippet for more clarification, please let me know. I will edit my question with the code.</p>