Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Não existe troca de telas

O aplicativo roda normalmente dentro de uma mesma tela, mas quando eu clico em + ou em "salvar", o app não troca a tela para adicionar o aluno (meu verifiquei meu código com o do professor, mas deixarei acabar).

Código:

activity_formulario_aluno.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <EditText android:id="@+id/activity_formulario_aluno_nome"
        android:layout_width="match_parent"
        android:layout_margin="8dp"
        android:hint="Nome"
        android:inputType="textCapWords"
        android:layout_height="wrap_content"/>

<EditText android:id="@+id/activity_formulario_aluno_telefone"
        android:layout_width="match_parent"
        android:layout_margin="8dp"
        android:hint="Telefone"
        android:inputType="phone"
        android:layout_height="wrap_content"/>

<EditText android:id="@+id/activity_formulario_aluno_email"
        android:layout_width="match_parent"
        android:layout_margin="8dp"
        android:hint="Email"
        android:inputType="textEmailAddress"
        android:layout_height="wrap_content"/>

<Button android:id="@+id/activity_formulario_aluno_botao_salvar"
    android:layout_width="match_parent"
    android:layout_margin="8dp"
    android:text="Salvar"
    android:layout_height="wrap_content"/>

</LinearLayout>

activity_lista_aluno.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"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/action_lista_alunos_fab_novo_aluno"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:layout_alignParentBottom="true"
        android:layout_marginEnd="20dp"
        android:layout_marginBottom="20dp"
        android:clickable="true"
        android:focusable="true"
        android:src="@drawable/ic_action_novo_aluno" />

    <ListView
        android:id="@+id/activity_lista_alunos_listview"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    </ListView>

</RelativeLayout>

Manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="br.com.alura.agenda">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.Agenda">
        <activity android:name=".ui.activity.ListaAlunosActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

Todos os outros códigos estão de acordo com o que o professor postou.

1 resposta
solução!

Eduardo, tudo bem ?

Cara, pra trocar a tela você precisa ter a outra tela, pelo que percebi você ainda não a criou, olhando pelo seu manifest, provavelmente tu verá isso nas próximas aulas.