简体   繁体   中英

App's name doesn't show up in Android Studio

Android studio doesn't show the app's name:

在此处输入图片说明

In the screenshot, you can see that the app's name is not visible. How can I fix it?

I solved the issue by setting in "View Options" the "Show System UI" option:

设置 Android Studio 视图选项以在布局中显示 AppName

Check your style.xml file under res->values->style.xml

The style theme will be as followes:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
</style>

You need to check if the parent has the value Theme.AppCompat.Light.DarkActionBar . It should not have something like Theme.AppCompat.Light.NoActionBar where app`s your title will not be visible as there is no action bar itself.

Are you asking to want app name in left top corner? 在此处输入图片说明

在此处输入图片说明

Just change app theme as defaultTheme in layout for application name shows in layout view

You can done using like this..

Create new project & set basic activity in template will give the project with toolbar & appname will shown in toolbar.

File->New Project->Next->Next->Select Basic Activity template(Default its select empty activity)->Finish.

Another Way if you want to view temporarly to see your app name select theme with name contain ActionBar like DarkActionBar you can get the desired results.

在此处输入图片说明

The problem can occur when you use too long app name. Try making the app name shorter. I had the same issue and that was my problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM