ConstraintLayout will not let me set a constraint connecting a view to the edge of the screen

Viewed 358

Here's the image for what it looks like right now. I want the floating action button to be right at the bottom of the screen. Here's me trying to do that.Ok, so here's the activity_main file:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context="com.example.jaden.finances.MainActivity">


    <android.support.v7.widget.Toolbar
        android:id="@+id/appBarLayout"
        android:layout_width="360dp"
        android:layout_height="81dp"
        android:background="?attr/colorPrimary"
        app:popupTheme="@style/AppTheme.PopupOverlay"
        tools:layout_editor_absoluteY="0dp"
        tools:layout_editor_absoluteX="0dp" />


    <android.support.design.widget.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="40dp"
        android:layout_height="40dp"
        app:srcCompat="@android:drawable/ic_dialog_email"
        tools:layout_editor_absoluteY="0dp"
        tools:layout_editor_absoluteX="0dp" />

    <EditText
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:inputType="text"
        android:text="Name"
        android:ems="10"
        android:id="@+id/editText"
        android:hint="@string/edit_message"
        tools:layout_editor_absoluteY="83dp"
        tools:layout_editor_absoluteX="16dp" />

    <Button
        android:text="@string/button_send"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/button3"
        android:onClick="sendMessage"
        tools:layout_editor_absoluteX="249dp"
        tools:layout_editor_absoluteY="81dp" />

    <ScrollView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        tools:layout_editor_absoluteY="126dp"
        tools:layout_editor_absoluteX="8dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:id="@+id/options">

        </LinearLayout>
    </ScrollView>
</android.support.constraint.ConstraintLayout>

I'm not sure what I'm doing wrong. When I go into the graphical design editor and click and drag the edges to create a new constraint, it will not latch on to the edges of the screen. A google search produces nothing.

1 Answers
Related