Android程序运行后,标签label没显示是怎么回事

藝y 2016-09-22 04:08:09
程序本来运行可以显示下图红框的标签的,但是在代码中添加了对话框的代码后,运行程序,上面的标签没显示了,新手刚学android,求原因。
AndroidManifest.xml代码:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.yi.helloworld">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="我的第一个APP"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity2">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
图片:
...全文
1106 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
藝y 2016-09-23
  • 打赏
  • 举报
回复
自顶。。。。
藝y 2016-09-23
  • 打赏
  • 举报
回复
原来是继承了Acticity会默认不显示标题,继承AppCompatActivity后才能显示

80,471

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧