title: Removing space from Edit Text String
body: <p>In my android app, I am getting the String from an Edit Text and using it as a parameter to call a web service and fetch JSON data.
  Now, the method I use for getting the String value from Edit Text is like this :</p>
  
  <pre><code>final EditText edittext = (EditText) findViewById(R.id.search);
  
  String k = edittext.getText().toString();
  </code></pre>
  
  <p>Now normally it works fine, but if we the text in Edit Text contains space then my app crashes.</p>
  
  <p>for eg. - if someone types "food" in the Edit Text Box, then it's OK
  but if somebody types "Indian food" it crashes. </p>
  
  <p>How to remove spaces and get just the String ?</p>