I have an application that does this : When the application starts,one row with 3 editTexts is created by calling a method called newproduct().The first of them is focused and this triggers the creation of another row of those 3 edittexts.So,when the last row is focused,another row is created dynamically. Every columns is inside a different linear layout and gets added to a new ArrayList&lt;EditText&gt;();,one for everyone of the 3 columns.The values that get entered are then put inside a String[],again,3 of them for every column.  My questions now are the following : 1.How can i save this on screen orientation changes? When i change the orientation,the values remain but only in two of the rows because those 2 rows are created at onCreate( newproduct method called,creates the first row, and then focused,so it creates another row).How can i tell my application to create more then 2 rows and keep the values ?  2.How can i make my application keep everything,the number of rows and their values and the whole UI layout when the user either exits the app or the app crashes.What i want here is when he enters the app again to see the state in which the app was left the last time.  Thanks in advance and have a nice day !
I've been working on the Android SDK platform, and it is a little unclear how to save an application's state. So given this minor re-tooling of the 'Hello, Android' example:  package com.android.hello;  import android.app.Activity; import android.os.Bundle; import android.widget.TextView;  public class HelloAndroid extends Activity {    private TextView mTextView = null;    /** Called when the activity is first created. */   @Override   public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);      mTextView = new TextView(this);      if (savedInstanceState == null) {        mTextView.setText("Welcome to HelloAndroid!");     } else {        mTextView.setText("Welcome back.");     }      setContentView(mTextView);   } }   I thought it would be enough for the simplest case, but it always responds with the first message, no matter how I navigate away from the app.  I'm sure the solution is as simple as overriding onPause or something like that, but I've been poking away in the documentation for 30 minutes or so and haven't found anything obvious.
window.onbeforeunload and window.onunload is not working in Firefox, Safari, Opera? How can I acknowledge, thank, or otherwise approve of an edit? Possible Duplicate:    Sometimes I get an edit that greatly improves a question or answer I have submitted.  I'd like to acknowledge an edit like this, so that readers can know that the revision was approved of by the OP (me!). I was thinking of comments on edit, or a checkbox noting that OP vouches for the edit.  Sometimes I would like to add a comment to the question or answer, but those don't make a lot of sense in that context. Any suggestions about the best way to do this?  Consider this a feature request, as it seems useful to know that a particular edit was endorsed/vetted by the OP. show all my unanswered questions from SE Any way how to get    my all un-answered questions  from across all SE sites? Many researchers list out their submitted manuscripts on their website. Some specify the journal name, like     Smith J, Oliver J (under review) My awesome paper. Nature.   while others don't, like     Smith J, Oliver J (under review) My awesome paper.   One reason I can think of as to why some don't mention the journal name is that they may get embarrassed in the case where the current journal rejects the paper. Then, the "circle" will know this paper gets rejected from Nature first and then ends up in an inferior journal.  Besides this, are there any other considerations preventing people from mentioning to which journal they submit a paper to?  P.S.: I am asking because my advisor is a researcher who only mentions accepted  papers on his webpage. As a student hunting jobs, I feel it is advantageous for me to mention my submitted papers on my webpage. I hesitate to do so, as I worry I may make my advisor unhappy by announcing in which journal our papers are currently under review. Prove: $|a\sin x+b \cos x|\leq \sqrt{a^2+b^2}$ Easy way to remap non-modifier keys on Mac? I want to remap § to ` and ± to ~ on my Mac keyboard because they are located in a place I am not used to. Is there an easy way to do this? How can I put the computer to sleep from Command Prompt/Run menu? I know that almost everything on Windows, like opening any sort of application, can be done from the command prompt or from the Run menu.  How can I put my computer to sleep or shut it down? What is the command for that? 60% Downpayment on house? Using all the letters of the word ARRANGEMENT how many different words using all letters at a time can be made such that both A, both E, both R both N occur together . Lagrangian and Hamiltonian EOM with dissipative force I am trying to write the Lagrangian and Hamiltonian for the forced Harmonic oscillator before quantizing it to get to the quantum picture. For EOM $$m\ddot{q}+\beta\dot{q}+kq=f(t),$$ I write the Lagrangian  $$ L=\frac{1}{2}m\dot{q}^{2}-\frac{1}{2}kq^{2}+f(t)q$$ with Rayleigh dissipation function as   $$ D=\frac{1}{2}\beta\dot{q}^{2}$$ to put in Lagrangian EOM $$0 = \frac{\mathrm{d}}{\mathrm{d}t} \left ( \frac {\partial L}{\partial \dot{q}_j} \right ) - \frac {\partial L}{\partial q_j} + \frac {\partial D}{\partial \dot{q}_j}. $$  On Legendre transform of $L$, I get $$H=\frac{1}{2m}{p}^{2}+\frac{1}{2}kq^{2}-f(t)q.$$  How do I include the dissipative term to get the correct EOM from the Hamiltonian's EOM? Did not receive site association bonus (+100 rep) 408 Request Time-outs still continues I'm frequently getting 408 Request Time-out errors  when browsing through Stack Overflow and Meta. I used to get this four or five times a day before, but now it has become very frequent. I've read  in which Kyle Brandt ♦ says:     We send our web logs to SQL so we can query them. It turns out that we have a bug that prevents 408s from being logged to SQL. [...] I will do more extensive research when our 408s are part of queryable logs (should be a week or two [...]).   My internet connection is somewhat stable and I haven't experienced this issue on other sites before. I don't think it's a browser-specific issue as it is reproducible on latest versions of Google Chrome and Firefox (on Ubuntu 13.10). However, it is specific to Stack Overflow and Meta. I'm unable to reproduce this on other SE sites.  Am I the only one facing this issue? Could it be something wrong with the regional CDN or something like that? Could someone please take a look at this issue? ()  This appears when I try to close-vote questions, too: Why $f(x) = \sqrt{x}$ is a function? Why $f(x) = \sqrt{x}$ is a function (as I found in my textbook) since for example the square root of $25$ has two different outputs ($-5,5$) and a function is defined as "A function from A to B is a rule of corre- spondence that assigns to each element in set A exactly one element in B.", so $f(x) = \sqrt{x}$ is not a function? If $p,q$ are primes $(pq,a)=1$ and $p-1|q-1$ then prove $a^{q-1}\equiv 1\pmod{pq}$ $p,q$  primes, $(pq,a)=1$ and $p-1|q-1$ then prove $a^{q-1}\equiv 1\pmod{pq}$   Got this in an exam today and had no idea how to do it. Remove space around tikz Should form 'Continue' button be disabled if validation is incomplete? In forms we often see the 'continue' button inactive until all the required fields are complete:         &ndash; Wireframes created with   Is this actually a help to the user, or a hindrance?  I imagine the Pro for this is that it's a visual indicator to the user that they haven't finished filling in the form or dealing with errors (because even with inline validation a user won't be informed if they've never actually interacted with a field so won't show any errors for those at that point).  But then the main Con for this (which I've also seen borne out in usability testing) is that users will be confused why they can't click the button.  Is the pattern of disabling the Continue button until validation is complete actually providing a negative user experience? tag:* links incorrectly when using Save And Copy Profile To All Stack Exchange Accounts The  tag in my Stack Exchange profile links to different sites depending on where it's being viewed:  Profile on StackOverflow:  [tag:CSS] =&gt; https://stackoverflow.com/questions/tagged/css   Profile on StackExchange:  [tag:CSS] =&gt; https://stackexchange.com/questions/tagged/css   Profile on CodeReview:  [tag:CSS] =&gt; http://codereview.stackexchange.com/questions/tagged/css    I'd like to have these all link to https://stackoverflow.com/questions/tagged/css. You can ; why not add the ability to specify the site with tags? &lt;!-- tag: stackoverflow --&gt;[tag:css] &lt;!--tag: meta --&gt;[tag:feature-request]  The current behavior also cause a bug on my :    All tags send me to find a Panda aka 404 Page Not Found. Is there a free or open source library to read Excel files (.xls) directly from a C# program?   It does not need to be too fancy, just to select a worksheet and read the data as strings. So far, I've been using Export to Unicode text function of Excel, and parsing the resulting (tab-delimited) file, but I'd like to eliminate the manual step. In PHP, how do you change the key of an array element? How to completely remove virtual packages?