我正在努力学习Android开发。我点击了“空活动”模板,它显示了一个带有后退按钮的精美材质工具栏。但是,当我查看主布局xml文件时,我看不到它。难道我做错了什么?它应该是这样的吗?教程显示与我的不同:
教程显示材质工具栏:
这是我复制问题的视频:https://imgur.com/a/6fMaCki
以下是Android Studio为我创建的activity_main.xml:
<?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"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>