【发布时间】:2019-09-28 17:51:16
【问题描述】:
尝试使用此代码创建 android 简单应用程序:
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setTitle("mytitle");
还有这个
Toolbar toolbar = findViewById(R.id.toolbar);
toolbar.setTitle("mytitle");
setSupportActionBar(toolbar);
在Android X中都不能使用,请帮忙如何设置标题工具栏?
【问题讨论】:
-
你能分享你的活动布局吗?