我需要的分享按鈕分享在這樣TextView的文本共享文本,我在Java初學者和AndroidAndroid的按鈕,從TextView的
explanation http://i48.tinypic.com/hw0q42.png
我需要的分享按鈕分享在這樣TextView的文本共享文本,我在Java初學者和AndroidAndroid的按鈕,從TextView的
explanation http://i48.tinypic.com/hw0q42.png
上Button Click
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_TEXT,"Your score and Some extra text");
shareIntent.putExtra(Intent.EXTRA_SUBJECT, "The title");
startActivity(Intent.createChooser(shareIntent, "Share..."));
看看如何使用Intent啓動Share Via對話框。
看到這個職位有你的答案: Android Share Via Dialog
創建一個將上分享按鈕調用的方法,並在其中
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
startActivity(Intent.createChooser(sharingIntent, "Share via"));
添加此行試試這個link爲好。
乾杯
正如你所看到的,只有5分鐘的谷歌搜索給你的結果。因此,在涉及人們解決問題之前,請嘗試使用搜索引擎解決問題。 – Egor
好的謝謝你的建議 –