Add copy notify
This commit is contained in:
parent
26ea3d91e1
commit
b2f3535a93
|
|
@ -126,10 +126,10 @@ public class Market extends Spider {
|
|||
private void checkCopy(String url) {
|
||||
for (Data data : datas) {
|
||||
int index = data.getList().indexOf(new Item(url));
|
||||
if (index != -1) {
|
||||
if (index == -1) continue;
|
||||
String text = data.getList().get(index).getCopy();
|
||||
if (!text.isEmpty()) Utils.copy(text);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -156,9 +156,9 @@ public class Utils {
|
|||
}
|
||||
|
||||
public static void copy(String text) {
|
||||
ClipboardManager clipboard = (ClipboardManager) Init.context().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
ClipData clip = ClipData.newPlainText("fongmi", text);
|
||||
clipboard.setPrimaryClip(clip);
|
||||
ClipboardManager manager = (ClipboardManager) Init.context().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
manager.setPrimaryClip(ClipData.newPlainText("fongmi", text));
|
||||
notify("已複製 " + text);
|
||||
}
|
||||
|
||||
public static void loadUrl(WebView webView, String script) {
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
a8d5d275bb8703210af343b98eda5f6d
|
||||
77f83df61dccdda0e660148285fcc94a
|
||||
|
|
|
|||
Loading…
Reference in New Issue