Rya*_*yan 5 navigation android share drawer
我想在导航抽屉上创建一个分享按钮,当用户触摸按钮时,它将打开带有所有应用程序列表的黑色抽屉,用户可以共享Google Play链接.有没有通用的代码模板?我找到的唯一答案就是在一个应用程序上分享它,比如Facebook,这似乎没用,因为不是每个人都使用Facebook.
小智 8
使用共享意图http://developer.android.com/training/sharing/send.html
示例代码
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);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
14667 次 |
| 最近记录: |