3
如何將「複製鏈接」選項添加到Android中的Chrome自定義標籤選項菜單。在CustomTabs中添加自定義菜單項就像這樣。Android Chrome自定義標籤添加複製鏈接到選項菜單
CustomTabsIntent.Builder customTabsIntent = new CustomTabsIntent.Builder();
String menuItemTitle = App.s(R.string.share);
PendingIntent menuItemPendingIntent = createPendingIntentShare(url);
customTabsIntent.addMenuItem(menuItemTitle, menuItemPendingIntent);
我想添加複製鏈接選項就像Twitter在他的應用程序瀏覽器中做的那樣。我不知道如何將鏈接複製到CustomTabs中的剪貼板。
繼承人鏈接到BroadcastReceiver實施,將鏈接複製到剪貼板:https://gist.github.com/andreban/ccccade793f63ace207b – andreban
謝謝,它的工作原理。 –