完善个人资料,我的页面修改,红点提示逻辑
This commit is contained in:
parent
f99bef4ac8
commit
229c8e72cf
@ -66,6 +66,17 @@ public class UserBean implements Parcelable {
|
||||
private boolean randomPk;
|
||||
//随机天梯排位赛PK img,仅在主播PK时使用
|
||||
private String mRankPkImgUrl;
|
||||
//是否填写完整资料
|
||||
private String user_info_complete;
|
||||
|
||||
public String getUserInfoComplete() {
|
||||
return user_info_complete;
|
||||
}
|
||||
|
||||
public UserBean seUserInfoComplete(String userInfoComplete) {
|
||||
this.user_info_complete = userInfoComplete;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isRandomPk() {
|
||||
return randomPk;
|
||||
|
@ -0,0 +1,16 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class CompleteInformationEvent extends BaseModel {
|
||||
private boolean completeInformation = false;
|
||||
|
||||
public boolean isCompleteInformation() {
|
||||
return completeInformation;
|
||||
}
|
||||
|
||||
public CompleteInformationEvent setCompleteInformation(boolean completeInformation) {
|
||||
this.completeInformation = completeInformation;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -92,8 +92,12 @@ public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder {
|
||||
ViewClicksAntiShake.clicksAntiShake(toReceive, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
||||
|
||||
if (TextUtils.equals(model.getSrc(), "to_me_information")) {
|
||||
Bus.get().post(new CustomDrawerPopupEvent()
|
||||
.setDisMiss(true)
|
||||
.setHtmlUrl(model.getSrc())
|
||||
.setScreen(TextUtils.equals(model.getShowType(), "2")));
|
||||
}else {
|
||||
if (TextUtils.equals(model.getStatus(), "2")) {
|
||||
LiveNetManager.get(itemView.getContext())
|
||||
.sendTaskGift(model.getFlag(), new HttpCallback<String>() {
|
||||
@ -114,6 +118,9 @@ public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder {
|
||||
.setDisMiss(true));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@ package com.yunbao.common.views;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -48,6 +47,12 @@ public class DrawerTaskViewHolder extends RecyclerView.ViewHolder {
|
||||
public void onViewClicks() {
|
||||
if (TextUtils.isEmpty(model.getSrc())) {
|
||||
ToastUtil.show("SHOWER_ERROR");
|
||||
} else {
|
||||
if (TextUtils.equals(model.getSrc(), "to_me_information")) {
|
||||
Bus.get().post(new CustomDrawerPopupEvent()
|
||||
.setDisMiss(true)
|
||||
.setHtmlUrl(model.getSrc())
|
||||
.setScreen(TextUtils.equals(model.getShowType(), "2")));
|
||||
} else {
|
||||
IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo();
|
||||
StringBuffer htmlUrl = new StringBuffer();
|
||||
@ -72,6 +77,8 @@ public class DrawerTaskViewHolder extends RecyclerView.ViewHolder {
|
||||
.setScreen(TextUtils.equals(model.getShowType(), "2")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -1143,4 +1143,5 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="delete_account1">Do you want to delete the account</string>
|
||||
<string name="delete_account2">After clicking delete, it will take effect immediately and cannot be restored. Are you sure you want to continue?</string>
|
||||
<string name="delete_account3">Confirm deletion</string>
|
||||
<string name="complete_information">完整填寫領大禮</string>
|
||||
</resources>
|
||||
|
@ -1144,4 +1144,5 @@
|
||||
<string name="delete_account1">是否刪除賬號</string>
|
||||
<string name="delete_account2">點擊刪除後即刻生效,且不可恢復,您確認要繼續嗎?</string>
|
||||
<string name="delete_account3">確認刪除</string>
|
||||
<string name="complete_information">完整填寫領大禮</string>
|
||||
</resources>
|
||||
|
@ -1150,4 +1150,5 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="delete_account1">Do you want to delete the account</string>
|
||||
<string name="delete_account2">After clicking delete, it will take effect immediately and cannot be restored. Are you sure you want to continue?</string>
|
||||
<string name="delete_account3">Confirm deletion</string>
|
||||
<string name="complete_information">完整填寫領大禮</string>
|
||||
</resources>
|
||||
|
@ -859,6 +859,9 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
public void showerHtml(String htmlUrl, boolean screen) {
|
||||
if (TextUtils.equals(htmlUrl, "recharge")) {
|
||||
RouteUtil.forwardMyCoin(mContext);
|
||||
} else if (TextUtils.equals(htmlUrl, "to_me_information")){
|
||||
onBackPressed();
|
||||
Constants.isShowPage = 3;
|
||||
}else {
|
||||
if (!screen) {
|
||||
ZhuangBanActivity.forward(mContext, htmlUrl, false);
|
||||
|
@ -76,6 +76,7 @@ import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.LoginData;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.event.CompleteInformationEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.http.main.MainNetManager;
|
||||
@ -86,7 +87,6 @@ import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.main.R;
|
||||
@ -664,7 +664,8 @@ public class EntryActivity extends AppCompatActivity {
|
||||
home_zdy_img_cn = obj.getString("home_zdy_img_cn");
|
||||
}
|
||||
if (obj.containsKey("home_zdy_pop")) {
|
||||
NoviceInstructorManager.get(activity).setHomeZdyPop(obj.getString("home_zdy_pop"));
|
||||
NoviceInstructorManager.get(activity).setHomeZdyPop(obj.getString(
|
||||
"home_zdy_pop"));
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -63,9 +63,11 @@ import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.LiveSvgGiftBean;
|
||||
import com.yunbao.common.bean.UpdataListBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.custom.TabButtonGroup;
|
||||
import com.yunbao.common.dialog.HintDialog;
|
||||
import com.yunbao.common.dialog.InstructorOperationDialog;
|
||||
import com.yunbao.common.event.CompleteInformationEvent;
|
||||
import com.yunbao.common.event.InstructorOperationEvent;
|
||||
import com.yunbao.common.event.LiveFloatEvent;
|
||||
import com.yunbao.common.event.MainHomeCommunityToChatEvent;
|
||||
@ -91,7 +93,6 @@ import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.VersionUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.APKUpdateCustomPopup;
|
||||
import com.yunbao.common.views.AbsMainViewHolder;
|
||||
import com.yunbao.common.views.floatingview.APPEasyFloat;
|
||||
@ -497,6 +498,17 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
//获取指导员账号
|
||||
ConversationIMListManager.get(this).getUserInstructor(this);
|
||||
checkVersion();
|
||||
//是否完善个人资料
|
||||
MainHttpUtil.getBaseInfo(new CommonCallback<UserBean>() {
|
||||
@Override
|
||||
public void callback(UserBean bean) {
|
||||
if (!TextUtils.equals(bean.getUserInfoComplete(), "1")) {
|
||||
v_table_redpoint_me.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
v_table_redpoint_me.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1236,6 +1248,16 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
// }
|
||||
}
|
||||
|
||||
//红点(我的)
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onCompleteInformationEvent(CompleteInformationEvent event) {
|
||||
if (event.isCompleteInformation()) {
|
||||
v_table_redpoint_me.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
v_table_redpoint_me.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户被踢下线
|
||||
*
|
||||
|
@ -185,6 +185,12 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
}
|
||||
});
|
||||
redPoint.setVisibility(APKManager.get().getApkVerNew() ? View.GONE : View.VISIBLE);
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.complete_information), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -415,6 +421,13 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
}
|
||||
Constants.myUid = u.getGoodnum();
|
||||
Constants.myAvatar = u.getAvatar();
|
||||
if (TextUtils.equals(u.getUserInfoComplete(), "1")) {
|
||||
findViewById(R.id.complete_information_radius).setVisibility(View.INVISIBLE);
|
||||
findViewById(R.id.complete_information).setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
findViewById(R.id.complete_information_radius).setVisibility(View.VISIBLE);
|
||||
findViewById(R.id.complete_information).setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -127,9 +127,10 @@
|
||||
android:id="@+id/v_table_redpoint_me"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginRight="18dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/background_ff5075"
|
||||
android:visibility="gone" />
|
||||
android:visibility="visible" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -49,12 +49,38 @@
|
||||
android:gravity="center|left"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/complete_information_radius"
|
||||
android:layout_width="7dp"
|
||||
android:layout_height="7dp"
|
||||
android:layout_marginStart="115.9dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
app:cardBackgroundColor="#FF5730"
|
||||
app:cardCornerRadius="20dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/complete_information"
|
||||
android:layout_width="107.9dp"
|
||||
android:layout_height="25.25dp"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginTop="-5dp"
|
||||
android:background="@mipmap/icon_complete_information">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/complete_information"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12.44sp" />
|
||||
</RelativeLayout>
|
||||
<!--完善资料-->
|
||||
<LinearLayout
|
||||
android:id="@+id/lt_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="21dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
BIN
main/src/main/res/mipmap-xxxhdpi/icon_complete_information.png
Normal file
BIN
main/src/main/res/mipmap-xxxhdpi/icon_complete_information.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Loading…
Reference in New Issue
Block a user