title: How to bring back the texthint upon entering a word or pressing the add button within an edittext?
body: <p>Everytime I press add button or the enter of keyboard for adding a player name to my listview, the entered name remains. I want it to be that once you press enter/or the add button. This part goes back to the original hint text (in my case that is player ...) </p>
  
  <p>See code below: </p>
  
  <pre><code>adapter = new ArrayAdapter&lt;String&gt;(this, R.layout.listviewlayout, 
  R.id.list_content, list);
      Lv.setAdapter(adapter);
  
      final EditText Name = (EditText) findViewById(R.id.Playername);
      class MyKeyListener implements View.OnKeyListener {
          @Override
          public boolean onKey (View v, int keyCode, KeyEvent event) {
              if ((event.getAction() == KeyEvent.ACTION_DOWN) &amp;&amp;
                      (keyCode == KeyEvent.KEYCODE_ENTER)) {
  
                  String name = Name.getText().toString();
                  if (Name.length() &gt; 0) {
                      list.add(name);
                      adapter.notifyDataSetChanged();
                  }
                  return true;
              }
              return false;
          }
  
      }
  
      Name.setOnKeyListener(new MyKeyListener());
      Add.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View view) {
  
              String name = Name.getText().toString();
              if (Name.length() &gt; 0) {
                  list.add(name);
                  adapter.notifyDataSetChanged()
                  ;
              }
          }
      });
  
      Reset.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              list.clear();
  
          }
      });
  
      Sgame.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              if(!list.isEmpty())
                  openActivity2();
          }
      });
  </code></pre>