Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 android 新手,如何在不更改父主题的情况下以编程方式添加标题栏背景图像。我的应用程序基于 tab host 。有两个选项卡。我想从标题栏中删除应用程序名称和应用程序图标,并想添加背景图像。请帮忙。提前致谢。
您可以像这样将自定义布局添加到标题栏:
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.your_custom_layout);