0
我尝试了所有更改actionsherlock栏上的图标,但它只是显示我的android标志。 我试图取代图标,但失败了。我为我的操作栏颜色使用自定义主题。如何更改actionbarsherlock主页图标
getSupportActionBar().setIcon(R.drawable.ic_launcher);
这里是我的string.xml
<style name="Theme.MyTheme" parent="Theme.Sherlock.Light">
<item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
<item name="android:actionBarStyle">@style/Widget.MyTheme.ActionBar</item></style><style name="Widget.MyTheme.ActionBar" parent="Widget.Sherlock.ActionBar"><item name="android:background">@drawable/actionbar</item><item name="background">@drawable/actionbar</item><item name="android:displayOptions">showHome</item></style>
这里是清单文件
<application android:label="Myapp"
android:logo="@drawable/ic_launcher">
<activity
android:name="com.android.twitter.SplashScreen"
android:launchMode="singleTop"
android:configChanges="orientation|screenSize"
android:theme="@style/Theme.MyTheme"
/>
我不想显示在动作条标题..我只是想表明我的应用程序的标志那么有什么办法通过编码来改变图标? 谢谢
我想,我said..it为me..it不会工作,你只要给我的Android绿色标志的动作条.. –
它为我工作我只是改变图像的名称,并再次分配它 –
它在果冻豆和ICS的作品很好,但在姜饼它显示标志加应用程序名称...我不知道为什么?徽标加应用程序名称在操作栏上 –