2012-10-25 72 views
1

我已經通過內置的程序爲actionbarsherlock添加了一個社交分享按鈕。該共享項目顯示與它周圍的邊界。我怎樣才能刪除邊框?我不知道這個邊框是在9貼圖片,樣式,主題還是什麼。據我所知,它甚至可以是默認的Android風格。有人能指點我哪裏可以改變它嗎?在actionbarsherlock中刪除項目邊框

的XML的菜單如下:

<item 
    android:id="@+id/show_share_menu" 
    android:title="Share Menu" 
    android:actionProviderClass="com.actionbarsherlock.widget.ShareActionProvider"> 

回答

2

您可以創建自己的應用程序的主題由福爾摩斯主題與空(NULL)背景風格延伸並覆蓋activityChooserViewStyle這樣

<style name="Theme.CustomTheme" parent="Theme.Sherlock.Light"> 
    <item name="activityChooserViewStyle">@style/ActionBar.ActivityChooser</item> 
</style> 

<style name="ActionBar.ActivityChooser" parent="Widget.Sherlock.Light.ActivityChooserView"> 
    <item name="android:background">@null</item> 
</style> 

或者使用像這樣的默認Sherlock活動選擇器風格

<style name="Theme.CustomTheme" parent="Theme.Sherlock.Light"> 
    <item name="activityChooserViewStyle">@style/Widget.Sherlock.ActivityChooserView</item> 
</style> 

然後在AndroidManifest.xml中將您的應用程序主題更改爲您的自定義主題。