FileDocCategorySizeDatePackage
ShareCompatICS.javaAPI DocAndroid 5.1 API1557Thu Mar 12 22:22:56 GMT 2015android.support.v4.app

ShareCompatICS

public class ShareCompatICS extends Object

Fields Summary
private static final String
HISTORY_FILENAME_PREFIX
Constructors Summary
Methods Summary
public static voidconfigureMenuItem(android.view.MenuItem item, android.app.Activity callingActivity, android.content.Intent intent)


             
        ActionProvider itemProvider = item.getActionProvider();
        ShareActionProvider provider = null;
        if (!(itemProvider instanceof ShareActionProvider)) {
            provider = new ShareActionProvider(callingActivity);
        } else {
            provider = (ShareActionProvider) itemProvider;
        }
        provider.setShareHistoryFileName(HISTORY_FILENAME_PREFIX +
                callingActivity.getClass().getName());
        provider.setShareIntent(intent);
        item.setActionProvider(provider);