在操作栏中设置图像 [英] Set image in action bar

查看:32
本文介绍了在操作栏中设置图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用

ActionBar.setBackgroundDrawable(getResources().getDrawable(R.drawable.header));

并且还从 manifest.xml 中删除了 "android:icon="@drawable/header"

and also removed "android:icon="@drawable/header" from manifest.xml

但我发现一张图片重叠在另一张图片上.我正在附加快照.

but I am getting one image overlapped over other. I am attaching snapshot.

我只想显示我的图片.

推荐答案

getActionBar().setDisplayShowHomeEnabled(false);

在你的代码中添加这个你会得到想要的输出!!!

add this in your code you will get the desired output!!!

这篇关于在操作栏中设置图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆