socialize / socialize-sdk-android

Socialize SDK for Android. An Android social sharing SDK for native apps.
www.getsocialize.com
Apache License 2.0
147 stars 57 forks source link

Customizing Action Bar Buttons #19

Closed sromanuk closed 11 years ago

sromanuk commented 12 years ago

There are a few snippets of code that should help developers to customize which of the Socialize ActionBar buttons should be shown. It was done by adding to the socialize.properties four keys that describes visibility of each button on the ActionBar.

Usage example could be seen below:

socialize.buttons.sharing.enabled=false

This will remove share button from the ActionBar but all the rest will stay there. Their width would be adjusted. Default values for these properties is true so if nothing will be added to the socialize.properties the ActionBar will work as before.

The properties keys that could be used and constants for them are listed below:

* socialize.buttons.sharing.enabled => SocializeConfig.SOCIALIZE_SHARING_ENABLED;
* socialize.buttons.like.enabled => SocializeConfig.SOCIALIZE_LIKE_ENABLED;
* socialize.buttons.comments.enabled => SocializeConfig.SOCIALIZE_COMMENTS_ENABLED;
* socialize.buttons.already_liked.enabled => SocializeConfig.SOCIALIZE_ALREADY_LIKED_ENABLED.
jasonpolites commented 12 years ago

Hey there,

I had a quick look at your changes. Looks good. We will probably merge the request for the next release.

Thanks!

jasonpolites commented 12 years ago

We'll have to put some tests around this, so not completely sure when it will be in actually.