title: Button not working (android studio)
body: <p>My app runs well and shows no errors, but my button is not working ( is unClickable in device)</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          Button button11=(Button)findViewById(R.id.button11);
          button11.setOnClickListener(new View.OnClickListener()
          {
              @Override
              public void onClick(View v)
              {
  
                  new Intent(MainActivity.this, Main2Activity.class);
  
              }
          });
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>and XML file :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  &lt;Button
              android:id="@+id/button11"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginLeft="50px"
              android:layout_marginTop="200dp"
              android:background="@color/colorPrimary"
              android:text="صفحه اصلی"
              android:onClick="onClick"/&gt;/&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>On the real device when I click on this button nothing happens !</p>