title: OnLongClickListener is not working as it's supposed to work
body: <p>The code is very simple.. Nothing great I am just trying to toast a message and for some reason the behavior is different in two cases.</p>
  
  <p>Case 1 : This is working:</p>
  
  <p>Here's the code:</p>
  
  <pre><code> @Override
          protected void onCreate(Bundle savedInstanceState) {
              // TODO Auto-generated method stub
              super.onCreate(savedInstanceState);
              setContentView(R.layout.webopen);
  
  
              TextView sometext = (TextView)findViewById(R.id.click);
              sometext.setOnLongClickListener(new OnLongClickListener() {
  
                  @Override
                  public boolean onLongClick(View v) {
                      Toast.makeText(getApplicationContext(), "Long click Working", Toast.LENGTH_LONG).show();
                      return false;
                  }
              });
  
  
              }
  </code></pre>
  
  <p>Case 2: Not working! I want to know the reason why it's not working</p>
  
  <pre><code>public class OnClick extends Activity implements OnLongClickListener {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.webopen);
  
          TextView sometext = (TextView) findViewById(R.id.click);
  
      }
  
      @Override
      public boolean onLongClick(View v) {
  
          switch (v.getId()) {
          case R.id.click:
              Toast.makeText(getApplicationContext(), "Long click enabled",
                      Toast.LENGTH_LONG).show();
              // OR
              // Something();
              break;
  
          default:
              break;
          }
  
          return false;
      }
  
      public boolean Something() {
  
          Toast.makeText(getApplicationContext(), "Long click enabled",
                  Toast.LENGTH_LONG).show();
          return true;
      }
  }
  </code></pre>
  
  <p>There's nothing great about the code but I just want to know the reason for onLongClickListener not working. </p>
  
  <p>Any suggestions will help ..:)</p>