title: Android FloatingActionButton "onclick" does not work
body: <p>I'm new to AndroidStudio and Java. I tried to use a FloatingActionButton to open another activity in my App but it does not work.. Here is the code of the Button in the XML file (the button itself works, I just have problems to link it correctly to the other activity):</p>
  
  <pre><code>&lt;android.support.design.widget.FloatingActionButton
      android:id="@+id/FAB"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="bottom|right"
      android:layout_margin="16dp"
      android:onClick="openInputWindow"
      android:clickable="true"
      android:src="@drawable/ic_add_black_36dp"
      app:layout_anchorGravity="bottom|right|end" /&gt;
  </code></pre>
  
  <p>Code in the Java file:</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  }
  
  public void openInputWindow (View view) {
      Intent intent = new Intent(this, AddElementActivity.class);
      startActivity(intent);
  </code></pre>
  
  <p>Many thanks for your help :)</p>