如何在android中创建标题栏?

时间:2017-10-19 14:07:47

标签: android

我是Android的新手并尝试为我的应用创建标题区和标题。我有的是这个: enter image description here

我的目标是这样的: enter image description here

当我查看每个XML时,约束xml是相同的。有人可以帮我添加标题栏#1。

<?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"

谢谢。

1 个答案:

答案 0 :(得分:1)

将您的AppTheme从styles文件夹从.NoActionBar更改为另一位ActionBar的父级,例如.DarkActionBar