title: The activities in android studio don't switch after pressing the button
body: <p>I've already tried searching the Google on how to switch activities in android studio, even in the official documentation with tutorial. I did it exactly like it was said but I am still unable to get redirected to another activity after clicking a button.</p>
  <p>I've entered an onClick name of the method to the button</p>
  <p>it looks like this: <a href="https://i.imgur.com/pmsztaL.png" rel="nofollow noreferrer">https://i.imgur.com/pmsztaL.png</a> (can't post images yet)</p>
  <p>and this is my MainActivity.class file with said method</p>
  <pre class="lang-java prettyprint-override"><code>public class MainActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  
      public void handleButtonAddNew(View view) {
          MainActivity.this.startActivity(new Intent(MainActivity.this, AddItemActivity.class));
      }
  }
  </code></pre>
  <p>After pressing the button in a phone, the button does nothing.</p>
  <p>This is my AddItemActivity.class</p>
  <pre class="lang-java prettyprint-override"><code>public class AddItemActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_add_item);
      }
  
  
      public void handleButtonRemember(View view) {
          finish();
      }
  }
  </code></pre>
  <p>How come the button doesn't work, what did I do wrong?</p>
  <h2>EDITS</h2>
  <p><strong>EDIT: Successfully ran emulator and the buttons did in fact work, the problem lies within my phone, the buttons there don't want to work. Where could be the issue now?</strong></p>
  <p><strong>EDIT: XML Layout of MainActivity.class</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;android.support.constraint.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      tools:context=&quot;.MainActivity&quot;&gt;
  
      &lt;Button
          android:id=&quot;@+id/buttonAddNew&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_marginEnd=&quot;188dp&quot;
          android:layout_marginRight=&quot;188dp&quot;
          android:layout_marginBottom=&quot;264dp&quot;
          android:text=&quot;@string/buttonAdd&quot;
          app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot; /&gt;
  
      &lt;ScrollView
          android:id=&quot;@+id/scrollView2&quot;
          android:layout_width=&quot;395dp&quot;
          android:layout_height=&quot;715dp&quot;
          android:layout_marginStart=&quot;8dp&quot;
          android:layout_marginLeft=&quot;8dp&quot;
          android:layout_marginTop=&quot;8dp&quot;
          android:layout_marginEnd=&quot;8dp&quot;
          android:layout_marginRight=&quot;8dp&quot;
          android:layout_marginBottom=&quot;8dp&quot;
          app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintHorizontal_bias=&quot;0.0&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot;&gt;
  
          &lt;LinearLayout
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:orientation=&quot;vertical&quot; /&gt;
      &lt;/ScrollView&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  <p><strong>EDIT: The problem was with scroll view blocking the clickable button so on my phone the button didn't register any clicks, after removing the scrollview the button works normally.</strong></p>