推送管理
This commit is contained in:
@@ -67,6 +67,13 @@ public abstract class RefreshAdapter<T> extends RecyclerView.Adapter {
|
||||
}
|
||||
}
|
||||
|
||||
public void refreshDel(){
|
||||
if (mRecyclerView != null) {
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void refreshData(List<T> list) {
|
||||
if (mRecyclerView != null && list != null) {
|
||||
mList.clear();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import com.yunbao.common.http.Data;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -13,10 +15,13 @@ public class DateFormatUtil {
|
||||
private static SimpleDateFormat sFormat2;
|
||||
private static SimpleDateFormat sFormat3;
|
||||
|
||||
private static SimpleDateFormat sFormat4;
|
||||
|
||||
static {
|
||||
sFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
||||
sFormat2 = new SimpleDateFormat("yyyyMMdd_HHmmss_SSS");
|
||||
sFormat3 = new SimpleDateFormat("MM.dd-HH:mm:ss");
|
||||
sFormat4 = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +29,14 @@ public class DateFormatUtil {
|
||||
return sFormat.format(new Date());
|
||||
}
|
||||
|
||||
public static String getTimeString(long time) {
|
||||
Date date = new Date(time); // 创建Date对象并传入时间戳参数
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 设置日期格式
|
||||
String formattedDate = sdf.format(date); // 格式化日期字符串
|
||||
return formattedDate;
|
||||
}
|
||||
|
||||
|
||||
public static String getVideoCurTimeString() {
|
||||
return sFormat2.format(new Date());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
@@ -46,7 +47,7 @@ public class RouteUtil {
|
||||
public static final String PATH_RED_PACKET_LIST = "/main/RedPacketListActivity";
|
||||
public static final String PATH_RED_PACKET_INFO = "/main/RedPacketInfoActivity";
|
||||
public static final String PATH_RED_PACKET_USER = "/main/RedPacketUsersActivity";
|
||||
public static final String PATH_SELECT_AVATAR="/main/UserAvatarSelectActivity";
|
||||
public static final String PATH_SELECT_AVATAR = "/main/UserAvatarSelectActivity";
|
||||
|
||||
public static void forwardFansActivity(String uid) {
|
||||
ARouter.getInstance().build(PATH_FANSACTIVITY)
|
||||
@@ -152,10 +153,15 @@ public class RouteUtil {
|
||||
/**
|
||||
* 跳转到
|
||||
*/
|
||||
public static void forwardLiveCompensateActivity(String url, boolean isFull) {
|
||||
public static void forwardLiveCompensateActivity(Context context, String msgid, String banner, String title, String content, String time, String link, boolean receive) {
|
||||
ARouter.getInstance().build(PATH_COMPENSATE_ACTIVITY)
|
||||
.withString("url", url)
|
||||
.withBoolean("isFull", isFull)
|
||||
.withString("msgid", msgid)
|
||||
.withString("banner", banner)
|
||||
.withString("title", title)
|
||||
.withString("content", content)
|
||||
.withString("time", time)
|
||||
.withString("link", link)
|
||||
.withBoolean("receive", receive)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
@@ -195,7 +201,7 @@ public class RouteUtil {
|
||||
* 跳转到充值页面
|
||||
*/
|
||||
public static void forwardMyCoin(Context context) {
|
||||
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=zhifu&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=zhifu&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
ARouter.getInstance().build(PATH_COIN).withString("url", url).navigation();
|
||||
}
|
||||
|
||||
@@ -246,14 +252,14 @@ public class RouteUtil {
|
||||
postcard.navigation();
|
||||
}
|
||||
|
||||
public static void forwardGiftWallActivity(String mStream, String mAnchorName, String mLiveUid, String mAvatarUrl, int isAttention,boolean isLive) {
|
||||
public static void forwardGiftWallActivity(String mStream, String mAnchorName, String mLiveUid, String mAvatarUrl, int isAttention, boolean isLive) {
|
||||
ARouter.getInstance().build(PATH_GIFT_WALL)
|
||||
.withString(Constants.LIVE_UID, mLiveUid)
|
||||
.withString(Constants.STREAM, mStream)
|
||||
.withString("mAnchorName", mAnchorName)
|
||||
.withString("mAvatarUrl", mAvatarUrl)
|
||||
.withInt("isAttention", isAttention)
|
||||
.withBoolean("isLive",isLive)
|
||||
.withBoolean("isLive", isLive)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
@@ -323,7 +329,7 @@ public class RouteUtil {
|
||||
/**
|
||||
* 系统头像选择
|
||||
*/
|
||||
public static void forwardUserAvatarSelect(){
|
||||
public static void forwardUserAvatarSelect() {
|
||||
ARouter.getInstance().build(PATH_SELECT_AVATAR)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
@@ -33,10 +33,12 @@ public class SpUtil {
|
||||
public static final String BEAUTY_SDK_TYPE = "beautySdkType";
|
||||
public static final String TURNTABLE_ENABLE = "turntableEnable";
|
||||
public static final String BEAUTY_360_TIEZHI_URL = "beauty360TiezhiUrl";
|
||||
public static final String BEAUTY_360_TIEZHI_EXIST = "beauty360TiezhiExist";
|
||||
public static final String ANCHOR_PK_TIME = "anchorPkTime";
|
||||
public static final String BEAUTY_360_TIEZHI_EXIST = "beauty360TiezhiExist";
|
||||
public static final String ANCHOR_PK_TIME = "anchorPkTime";
|
||||
//播放短视频上下滑动引导页
|
||||
public static final String READ_VIDEO_GUIDE = "readVideoGuide";
|
||||
public static final String READ_VIDEO_GUIDE = "readVideoGuide";
|
||||
|
||||
public static final String MESSAGE_SYS_DEL = "FIRST_DEL";
|
||||
|
||||
|
||||
public SpUtil() {
|
||||
@@ -73,8 +75,8 @@ public class SpUtil {
|
||||
/**
|
||||
* 判断一个值是否存在
|
||||
*/
|
||||
public boolean isExists(String key){
|
||||
return mSharedPreferences.contains(key);
|
||||
public boolean isExists(String key) {
|
||||
return mSharedPreferences.contains(key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.AttachPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.event.CustomDrawerPopupEvent;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class MsgSysDelPopupView extends AttachPopupView {
|
||||
|
||||
ItemDelListener itemDelListener;
|
||||
|
||||
public MsgSysDelPopupView(@NonNull Context context, ItemDelListener itemDelListener) {
|
||||
super(context);
|
||||
this.itemDelListener = itemDelListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.view_msg_sys_del;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
//特效设置
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.del), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
itemDelListener.onItemDel();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public interface ItemDelListener {
|
||||
void onItemDel();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user