取消淘宝跳转,收藏夹增加分享

This commit is contained in:
sonichy
2019-11-13 18:09:57 +08:00
parent 263af96752
commit 63f3ce9e5c
6 changed files with 40 additions and 25 deletions

View File

@@ -75,6 +75,7 @@ public class FavoriteActivity extends Activity {
menu.add(0, 0, 0, "复制链接");
menu.add(0, 1, 1, "删除");
menu.add(0, 2, 2, "修改");
menu.add(0, 3, 3, "分享");
}
});
search(editText.getText().toString());
@@ -190,6 +191,13 @@ public class FavoriteActivity extends Activity {
});
builder.create().show();
break;
case 3:
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.putExtra(Intent.EXTRA_TEXT, ((TextView) menuInfo.targetView.findViewById(R.id.title)).getText().toString() + "\n" + ((TextView) menuInfo.targetView.findViewById(R.id.website)).getText().toString());
intent.setType("text/plain");
startActivity(Intent.createChooser(intent, "分享"));
break;
}
return true;
}