Não consigo mover o botão floatingActionButton para a canto inferior esquerdo. Ele fica fixo no canto superior direito.
activity_main.xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/activity_main_lista_de_alunos"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/floatingActionButton"
android:layout_width="39dp"
android:layout_height="36dp"
android:clickable="true" />
</ListView>
</RelativeLayout>
MainActivity.java:
package br.com.alura.agenda;
import android.app.Activity; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast;
import androidx.annotation.Nullable;
import java.util.ArrayList; import java.util.Arrays; import java.util.List;
public class MainActivity extends Activity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); List alunos = new ArrayList<>( Arrays.asList("Andre", "Sandra", "Fernando", "Célia", "Jose")); ListView listaDeAlunos = findViewById(R.id.activity_main_lista_de_alunos); listaDeAlunos.setAdapter(new ArrayAdapter<>( this, android.R.layout.simple_list_item_1, alunos)); } }