我尝试了这些 - 但仍然没有看到这样的图标之前:
I tried these - but still do not see the icon like before:
getSupportActionBar().setLogo(R.drawable.ic_launcher);
getSupportActionBar().setDisplayUseLogoEnabled(true);
getSupportActionBar().setIcon(R.drawable.ic_launcher);
看来,当我使用自定义工具栏的工作 - 但是,这将迫使我摸所有布局 - 有没有更好的方式来做到这一点。
It seems to work when I use custom toolbar - but that would force me to touch all layouts - is there a better way to do so?
getSupportActionBar()setDisplayShowHomeEnabled(真);
以及
getSupportActionBar()的setIcon(R.drawable.ic_launcher);
上一篇:解读Android中的位图的大小合适位图、合适、大小、Android
下一篇:怎么做TransactionTooLargeException怎么做、TransactionTooLargeException