【问题标题】:How to create title bar in android?如何在android中创建标题栏?
【发布时间】:2017-10-19 14:07:46
【问题描述】:

我是 android 新手,正在尝试为我的应用创建标题区域和标题。我所拥有的是:

我的目标是这样的:

当我查看其中每一个的 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"

谢谢。

【问题讨论】:

标签: android


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-08-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-24
    • 2015-08-21
    相关资源
    最近更新 更多