【问题标题】:using ShareActionProvider somewhere else, not it ActionBarSherlock在其他地方使用 ShareActionProvider,而不是 ActionBarSherlock
【发布时间】:2014-07-15 13:21:32
【问题描述】:

抱歉这个菜鸟问题,但我一直使用 ActionBarSherlock 的 ShareActionProvider。现在我根本不想使用 ActionBarSherlock - 我想使用侧边菜单并有一个共享按钮 - 我可以这样做吗?

【问题讨论】:

    标签: android shareactionprovider


    【解决方案1】:

    你可以把它放在点击监听器或类似的东西中。

    Intent sendIntent = new Intent();
    sendIntent.setAction(Intent.ACTION_SEND);
    sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
    sendIntent.setType("text/plain");
    startActivity(sendIntent);
    

    应该显示这样的对话框:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-05-27
      • 1970-01-01
      • 1970-01-01
      • 2010-11-23
      • 1970-01-01
      • 2021-11-09
      • 1970-01-01
      相关资源
      最近更新 更多