(share) add share functionality
- get the text shared and put it on the Clipboard - pass by the same way that past for Download the information
This commit is contained in:
parent
b1bbcb39d5
commit
418fbd3b5c
|
@ -390,6 +390,9 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
|
||||||
int left = Math.min(start, end);
|
int left = Math.min(start, end);
|
||||||
int right = Math.max(start, end);
|
int right = Math.max(start, end);
|
||||||
textEditor.getText().replace(left, right, text, 0, text.length());
|
textEditor.getText().replace(left, right, text, 0, text.length());
|
||||||
|
|
||||||
|
parser.putInClipboardManager(this, text);
|
||||||
|
textEditor.onPaste();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,12 @@ public class ParserUtils {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void putInClipboardManager(Context context, String string) {
|
||||||
|
ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||||
|
ClipData clip = ClipData.newPlainText("", string);
|
||||||
|
clipboard.setPrimaryClip(clip);
|
||||||
|
}
|
||||||
|
|
||||||
// parse the HTML page
|
// parse the HTML page
|
||||||
private HeaderInfo parsePageHeaderInfo(String urlStr) throws Exception {
|
private HeaderInfo parsePageHeaderInfo(String urlStr) throws Exception {
|
||||||
Connection con = Jsoup.connect(urlStr);
|
Connection con = Jsoup.connect(urlStr);
|
||||||
|
|
Loading…
Reference in New Issue