【发布时间】:2021-07-19 15:11:22
【问题描述】:
【问题讨论】:
标签: android
【问题讨论】:
标签: android
是的,我想是的。您可以将应用程序设置为全屏,这样状态栏就不会出现。 如果您正在使用 AppCompatActivity 来设计您的工具栏,您可以使用类似的东西:
private void configureToolbar(){
// Get the toolbar view inside the activity layout
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
// Set the Toolbar
setSupportActionBar(toolbar);
}
在您的活动主目录中,包括工具栏:
<include
layout="@layout/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
为酒吧创建一个布局,你就可以开始了:
<?xml version="1.0" encoding="utf-8"?>
<!-- Déclaration de notre Toolbar -->
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:minHeight="?attr/actionBarSize"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/ToolbarTheme"
app:titleTextAppearance="@style/Toolbar.TitleText"/>
【讨论】: