公共依赖库
-
默认分享
-
使用 BottomSheetsDialog 遵循 Material Design 标准的分享界面:
默认分享
AndroidShareHelper shareDefault = new AndroidShareHelper();
shareDefault.shareDefaultText(this,"默认分享标题","title","content");
使用 BottomSheetsDialog 分享
AndroidShareHelper shareWithBottomSheetsDialog = new AndroidShareHelper();
shareWithBottomSheetsDialog.shareWithBottomSheets(
this,
R.layout.layout_bottomsheetsdialog,
shareHelper2.getShareTextIntent("默认分享标题", "https://www.google.com.hk/?gws_rd=ssl")
);
Toast with theme color
// Toast background
<color name="colorPrimaryDark">#993F9F</color>
//next
UIToast.showToast(this, "Toast with theme color");
Toast with custom color
UIToast.showToast(this, "Toast with custom color", true, /*background color*/Color.GREEN, /*toast textColor*/Color.RED);