I am using ActionBarSherlock and have implemented ShareActionProvider.
When a user selects an app to share content with, eg Twitter, the actionbar displays a Twitter icon next to the Share button icon. This stays there forever.
Does anybody know how to disable the application icon from appearing next to the Share button?
Found the answer:
Implement OnShareTargetSelectedListener and set it on the ShareActionProvider
public void onCreateOptionsMenu(Menu menu){
....
actionProvider.setOnShareTargetSelectedListener(this);
....
@Override
public boolean onShareTargetSelected(ShareActionProvider source,
Intent intent) {
context.startActivity(intent);
// started activity ourself to prevent search history
return true;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With