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的作品很好,但在薑餅它顯示標誌加應用程序名稱...我不知道爲什麼?徽標加應用程序名稱在操作欄上 –