Bom dia, sou novo em programação Android e estou tentando criar um programa que baseado numa matéria que o usuário escolher, abrirá uma determinada tela, tudo que fui fazendo foi baseado em pesquisa em sites, vídeos e etc; porém ao compilar o programa e executá-lo, ele trava quando clico no botão para ir para o menu (esse da print), e simplesmente fecha. Achei que o erro poderia ser na barra de pesquisa, porém usei a mesma em outras duas telas e funcionou, então creio que o problema seja na Scrool View. A ideia seria ela girar em vertical para exibir as outras matérias e a barra de pesquisa permanecer estática acima. Agradeço a quem puder ajudar :)
código da activity:
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar2"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/blue" />
<EditText
android:layout_width="200dp"
android:layout_height="50dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginStart="55dp"
android:background="@color/blue"
android:ems="10"
android:inputType="text"
android:text="@string/textView"
android:labelFor="@id/toolbar2"
android:textColor="@color/black" />
<ImageButton
android:id="@+id/my_account"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignBottom="@+id/toolbar2"
android:layout_alignParentRight="true"
android:background="@color/blue"
android:scaleType="fitEnd"
app:srcCompat="@drawable/account"
android:clickable="true"
android:onClick="conta"/>
<ImageButton
android:id="@+id/search_user"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentTop="true"
android:layout_marginEnd="22dp"
android:layout_marginTop="10dp"
android:layout_toStartOf="@+id/my_account"
android:background="@color/blue"
android:scaleType="fitEnd"
app:srcCompat="@drawable/magnify"
android:clickable="true"
android:onClick="obras"/>
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageButton
android:id="@+id/imageButtonArte"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_marginLeft="10dp"
android:background="@color/transparente"
android:scaleType="fitXY"
app:srcCompat="@drawable/icone_arte"
android:clickable="true"
android:onClick="obras"/>
<ImageButton
android:id="@+id/imageButtonBiologia"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_marginStart="40dp"
android:background="@color/transparente"
android:scaleType="fitXY"
android:clickable="true"
app:srcCompat="@drawable/icone_biologia"
android:onClick="obras"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageButton
android:id="@+id/imageButtonFilosofia"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:scaleType="fitXY"
android:background="@color/transparente"
android:clickable="true"
android:onClick="obras"
app:srcCompat="@drawable/icone_filosofia"/>
<ImageButton
android:id="@+id/imageButtonFisica"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_marginStart="40dp"
android:layout_marginTop="10dp"
android:background="@color/transparente"
android:scaleType="fitXY"
android:clickable="true"
android:onClick="obras"
app:srcCompat="@drawable/icone_fisica" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageButton
android:id="@+id/imageButtonGeografia"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_marginLeft="10dp"
android:background="@color/transparente"
android:layout_marginTop="10dp"
android:scaleType="fitXY"
android:visibility="visible"
android:clickable="true"
android:onClick="obras"
app:srcCompat="@drawable/icone_geografia" />
<ImageButton
android:id="@+id/imageButtonHistoria"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_marginStart="40dp"
android:background="@color/transparente"
android:layout_marginTop="10dp"
android:scaleType="fitXY"
android:clickable="true"
android:onClick="obras"
app:srcCompat="@drawable/icone_historia" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageButton
android:id="@+id/imageButtonMatematica"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_marginLeft="10dp"
android:background="@color/transparente"
android:layout_marginTop="10dp"
android:scaleType="fitXY"
android:clickable="true"
android:onClick="obras"
app:srcCompat="@drawable/icone_matematica" />
<ImageButton
android:id="@+id/imageButtonPortugues"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_marginStart="40dp"
android:background="@color/transparente"
android:layout_marginTop="10dp"
android:scaleType="fitXY"
app:srcCompat="@drawable/icone_portugues"
android:clickable="true"
android:onClick="obras"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageButton
android:id="@+id/imageButtonQuimica"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_marginLeft="10dp"
android:background="@color/transparente"
android:layout_marginTop="10dp"
android:scaleType="fitXY"
android:clickable="true"
android:onClick="obras"
app:srcCompat="@drawable/icone_quimica" />
<ImageButton
android:id="@+id/imageButtonSociologia"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_marginTop="10dp"
android:layout_marginStart="40dp"
android:background="@color/transparente"
android:scaleType="fitXY"
android:clickable="true"
android:onClick="obras"
app:srcCompat="@drawable/icone_sociologia" />
</LinearLayout>
</LinearLayout>
</ScrollView>