推送管理
This commit is contained in:
@@ -209,6 +209,8 @@ dependencies {
|
||||
|
||||
// 多语言语音识别扩展库(可选)
|
||||
api 'tech.sud.mgp:SudASR:1.3.3.1158'
|
||||
//侧滑删除
|
||||
api 'com.yanzhenjie.recyclerview:x:1.3.2'
|
||||
|
||||
//华为支付插件包
|
||||
//api project(':lib_huawei')
|
||||
|
||||
@@ -69,7 +69,8 @@ public class DialogUitl {
|
||||
}
|
||||
return dialog;
|
||||
}
|
||||
public static void showToast(Context context,String content,long delayMillis){
|
||||
|
||||
public static void showToast(Context context, String content, long delayMillis) {
|
||||
Dialog dialog = new Dialog(context, R.style.dialog);
|
||||
dialog.setContentView(R.layout.dialog_toast);
|
||||
dialog.setCancelable(false);
|
||||
@@ -82,7 +83,7 @@ public class DialogUitl {
|
||||
}
|
||||
}
|
||||
dialog.show();
|
||||
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss,delayMillis);
|
||||
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss, delayMillis);
|
||||
}
|
||||
|
||||
|
||||
@@ -121,6 +122,38 @@ public class DialogUitl {
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
|
||||
public static void showDelSysMsg(Context context, String content, SimpleCallback simpleCallback) {
|
||||
if (context instanceof Activity) {
|
||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
final Dialog dialog = new Dialog(context, R.style.dialog2);
|
||||
dialog.setContentView(R.layout.dialog_del_sys_msg);
|
||||
dialog.setCancelable(true);
|
||||
dialog.setCanceledOnTouchOutside(true);
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
TextView contentTextView = (TextView) dialog.findViewById(R.id.content);
|
||||
contentTextView.setText(content);
|
||||
}
|
||||
dialog.findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.findViewById(R.id.btn_confirm).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
simpleCallback.onConfirmClick(dialog, "");
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
|
||||
public static void showSimpleDialog(Context context, String content, SimpleCallback callback) {
|
||||
showSimpleDialog(context, content, false, callback);
|
||||
}
|
||||
@@ -135,13 +168,7 @@ public class DialogUitl {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context)
|
||||
.setTitle(title)
|
||||
.setContent(content)
|
||||
.setCancelable(cancelable)
|
||||
.setClickCallback(callback)
|
||||
.build()
|
||||
.show();
|
||||
new Builder(context).setTitle(title).setContent(content).setCancelable(cancelable).setClickCallback(callback).build().show();
|
||||
}
|
||||
|
||||
public static void showSimpleDialog(Context context, String title, String content, boolean cancelable, SimpleCallback3 callback) {
|
||||
@@ -150,13 +177,7 @@ public class DialogUitl {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context)
|
||||
.setTitle(title)
|
||||
.setContent(content)
|
||||
.setCancelable(cancelable)
|
||||
.setClickCallback3(callback)
|
||||
.build()
|
||||
.show();
|
||||
new Builder(context).setTitle(title).setContent(content).setCancelable(cancelable).setClickCallback3(callback).build().show();
|
||||
}
|
||||
|
||||
public static void showSimpleInputDialog(Context context, String title, String hint, int inputType, int length, SimpleCallback callback) {
|
||||
@@ -165,15 +186,7 @@ public class DialogUitl {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context).setTitle(title)
|
||||
.setCancelable(true)
|
||||
.setInput(true)
|
||||
.setHint(hint)
|
||||
.setInputType(inputType)
|
||||
.setLength(length)
|
||||
.setClickCallback(callback)
|
||||
.build()
|
||||
.show();
|
||||
new Builder(context).setTitle(title).setCancelable(true).setInput(true).setHint(hint).setInputType(inputType).setLength(length).setClickCallback(callback).build().show();
|
||||
}
|
||||
|
||||
|
||||
@@ -483,8 +496,8 @@ public class DialogUitl {
|
||||
mClickCallback3.onConfirmClick(dialog);
|
||||
}
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onConfirmClick(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
}else{
|
||||
mSimpleCallbackView.onConfirmClick(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
} else {
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@@ -501,8 +514,8 @@ public class DialogUitl {
|
||||
((SimpleCallback2) mClickCallback).onCancelClick();
|
||||
}
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onCancel(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
}else{
|
||||
mSimpleCallbackView.onCancel(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
} else {
|
||||
dialog.dismiss();
|
||||
}
|
||||
}
|
||||
@@ -510,17 +523,17 @@ public class DialogUitl {
|
||||
}
|
||||
}
|
||||
};
|
||||
if(btnConfirm!=null) {
|
||||
if (btnConfirm != null) {
|
||||
btnConfirm.setOnClickListener(listener);
|
||||
}
|
||||
if(btnCancel!=null) {
|
||||
if (btnCancel != null) {
|
||||
btnCancel.setOnClickListener(listener);
|
||||
}
|
||||
dialog.setOnShowListener(new DialogInterface.OnShowListener() {
|
||||
@Override
|
||||
public void onShow(DialogInterface dialogInterface) {
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onShow(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
mSimpleCallbackView.onShow(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -563,8 +576,7 @@ public class DialogUitl {
|
||||
/**
|
||||
* 城市选择
|
||||
*/
|
||||
public static void showCityChooseDialog(Activity activity, ArrayList<Province> list,
|
||||
String province, String city, String district, AddressPicker.OnAddressPickListener listener) {
|
||||
public static void showCityChooseDialog(Activity activity, ArrayList<Province> list, String province, String city, String district, AddressPicker.OnAddressPickListener listener) {
|
||||
AddressPicker picker = new AddressPicker(activity, list);
|
||||
picker.setTextColor(0xff323232);
|
||||
picker.setDividerColor(0xffdcdcdc);
|
||||
|
||||
@@ -31,6 +31,8 @@ public class RouteUtil {
|
||||
public static final String PATH_MYWEBVIEWACTIVTITY = "/main/MyWebViewActivity";
|
||||
public static final String PATH_ZHUANGBANACTIVITY = "/main/ZhuangBanActivity";
|
||||
public static final String PATH_LiveZHUANGBANACTIVITY = "/live/ZhuangBanActivity";
|
||||
|
||||
public static final String PATH_COMPENSATE_ACTIVITY = "/live/CompensateActivity";
|
||||
public static final String PATH_FACEBOOKACTIVITY = "/baidu/FacebookLoginActivity";
|
||||
public static final String PATH_MAIN = "/main/MainActivity";
|
||||
public static final String PATH_ENTRY = "/main/EntryActivity";
|
||||
@@ -147,6 +149,16 @@ public class RouteUtil {
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转到
|
||||
*/
|
||||
public static void forwardLiveCompensateActivity(String url, boolean isFull) {
|
||||
ARouter.getInstance().build(PATH_COMPENSATE_ACTIVITY)
|
||||
.withString("url", url)
|
||||
.withBoolean("isFull", isFull)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转到装扮
|
||||
*/
|
||||
|
||||
55
common/src/main/res/layout/dialog_del_sys_msg.xml
Normal file
55
common/src/main/res/layout/dialog_del_sys_msg.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="20dp"
|
||||
android:text="@string/dialog_tip"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="35dp"
|
||||
android:background="@mipmap/icon_del_sys_confirm"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@string/confirm"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:background="@mipmap/icon_del_sys_cancel"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@string/cancel"
|
||||
android:textColor="@color/yellow_ff6c00"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
BIN
common/src/main/res/mipmap-mdpi/icon_del_sys_cancel.png
Normal file
BIN
common/src/main/res/mipmap-mdpi/icon_del_sys_cancel.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
common/src/main/res/mipmap-mdpi/icon_del_sys_confirm.png
Normal file
BIN
common/src/main/res/mipmap-mdpi/icon_del_sys_confirm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -1397,4 +1397,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="pay_cancel">Payment cancellation</string>
|
||||
<string name="pay_suc">Payment successful</string>
|
||||
<string name="pay_fail">Payment failed</string>
|
||||
|
||||
<string name="msg_del_sys01">The items inside have not been claimed yet.Are you sure to delete the message?</string>
|
||||
<string name="msg_del_sys02">Are you sure to delete the message?</string>
|
||||
</resources>
|
||||
|
||||
@@ -1391,6 +1391,10 @@
|
||||
<string name="conversion_quantity_need_of_use2">二、1張觀影券可觀看一集短劇,兌換成功後即可返回觀影頁面,使用觀影券繼續觀看影片;</string>
|
||||
<string name="conversion_quantity_need_of_use3">三、觀影券禁止線下交易、收購等不正當行為,PDLIVE將對各類以盈利為目的的交易行為進行嚴厲打擊。</string>
|
||||
|
||||
|
||||
<string name="msg_del_sys01">內含物品還未領取,是否確定刪除消息?</string>
|
||||
<string name="msg_del_sys02">是否確定刪除消息?</string>
|
||||
|
||||
<string name="pay_cancel">支付取消</string>
|
||||
<string name="pay_suc">支付成功</string>
|
||||
<string name="pay_fail">支付失敗</string>
|
||||
|
||||
@@ -1390,6 +1390,10 @@
|
||||
<string name="conversion_quantity_need_of_use2">二、1張觀影券可觀看一集短劇,兌換成功後即可返回觀影頁面,使用觀影券繼續觀看影片;</string>
|
||||
<string name="conversion_quantity_need_of_use3">三、觀影券禁止線下交易、收購等不正當行為,PDLIVE將對各類以盈利為目的的交易行為進行嚴厲打擊。</string>
|
||||
|
||||
|
||||
<string name="msg_del_sys01">內含物品還未領取,是否確定刪除消息?</string>
|
||||
<string name="msg_del_sys02">是否確定刪除消息?</string>
|
||||
|
||||
<string name="pay_cancel">支付取消</string>
|
||||
<string name="pay_suc">支付成功</string>
|
||||
<string name="pay_fail">支付失敗</string>
|
||||
|
||||
@@ -1393,4 +1393,7 @@
|
||||
<string name="pay_suc">支付成功</string>
|
||||
<string name="pay_fail">支付失敗</string>
|
||||
|
||||
<string name="msg_del_sys01">內含物品還未領取,是否確定刪除消息?</string>
|
||||
<string name="msg_del_sys02">是否確定刪除消息?</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -1397,6 +1397,10 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="conversion_quantity_need_of_use2">2.One ticket can be used to watch one episode of a short drama. After successful redemption, you can return to the viewing page and use the ticket to continue watching the movie;</string>
|
||||
<string name="conversion_quantity_need_of_use3">3.Ticket prohibit illegal activities such as offline trading and acquisitions, and PDLIVE will crack down severely on various profit-making trading activities.</string>
|
||||
|
||||
<string name="msg_del_sys01">The items inside have not been claimed yet.Are you sure to delete the message?</string>
|
||||
<string name="msg_del_sys02">Are you sure to delete the message?</string>
|
||||
|
||||
|
||||
<string name="pay_cancel">Payment cancellation</string>
|
||||
<string name="pay_suc">Payment successful</string>
|
||||
<string name="pay_fail">Payment failed</string>
|
||||
|
||||
Reference in New Issue
Block a user