我需要在我的应用程序中设置标题和副标题。但是在新的设计库中,使用折叠工具栏布局可以设置标题和滚动图像工作正常。如何在折叠工具栏布局中设置副标题?
我们可以像这样以编程方式设置工具栏的标题和副标题:
Toolbar toolbar = (Toolbar)findViewById(R.id.toolbar);
toolbar.setTitle(getString(R.string.history));
toolbar.setSubtitle(getString(R.string.month));