拍卖房 fix bugs.
This commit is contained in:
@@ -1933,6 +1933,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
if (userId == currentUserId) {
|
||||
setRoleType(3, 888)
|
||||
switchMic(2)
|
||||
aBoolean = false
|
||||
ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding_up)
|
||||
}
|
||||
}
|
||||
} else if (text.type == 2) {
|
||||
@@ -1942,6 +1944,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
} else if ("888" == pitNumber) {
|
||||
mRoomInfoResp?.room_auction = RoomAuction()
|
||||
if (userId == currentUserId) {
|
||||
aBoolean = true
|
||||
ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding)
|
||||
setRoleType(0, 0)
|
||||
switchMic(2)
|
||||
}
|
||||
|
||||
@@ -78,9 +78,14 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
private List<RoomAuction.AuctionListBean> auctionList;
|
||||
private int type;
|
||||
RoomFragment parentFragment;
|
||||
private int isShowCardRelationshipFragment = -2;
|
||||
|
||||
public RoomAuctionFragment(){}
|
||||
public RoomAuctionFragment(RoomInfoResp resp){
|
||||
private CardRelationshipFragment dialogFragment = null;
|
||||
|
||||
public RoomAuctionFragment() {
|
||||
}
|
||||
|
||||
public RoomAuctionFragment(RoomInfoResp resp) {
|
||||
roomInfoResp = resp;
|
||||
}
|
||||
|
||||
@@ -408,8 +413,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (id == R.id.bangdan) {//出价榜单
|
||||
} else if (id == R.id.bangdan) {//出价榜单
|
||||
BidListDialogFragment.newInstance(SpUtil.getauctionId()).show(getChildFragmentManager(), "BidListDialogFragment");
|
||||
} else if (id == R.id.iv_auction1) {
|
||||
if (mBinding.ivAuction1.getUserId() != null && !mBinding.ivAuction1.getUserId().equals("")) {
|
||||
@@ -463,7 +467,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
} catch (Exception e) {
|
||||
viewName = "未知View ID: " + id;
|
||||
}
|
||||
LogUtils.e("wheatFeedingDF","点击了" + viewName +"========="+ClickUtils.isFastDoubleClick(view));
|
||||
LogUtils.e("wheatFeedingDF", "点击了" + viewName + "=========" + ClickUtils.isFastDoubleClick(view));
|
||||
}
|
||||
|
||||
|
||||
@@ -861,6 +865,17 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (isShowCardRelationshipFragment == -1) {
|
||||
isShowCardRelationshipFragment = CardRelationshipFragment.show(roomInfoResp.getRoom_info().getRoom_id(),
|
||||
SpUtil.getUserId() + "", type + "", getActivity().getSupportFragmentManager(), dialogFragment -> {
|
||||
this.dialogFragment = dialogFragment;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void event1022(RoomMessageEvent messageEvent) {
|
||||
if (messageEvent.getText().getType() == 1) {//拍卖位上麦
|
||||
if (messageEvent.getText().getPit_number().equals("888")) {
|
||||
@@ -870,14 +885,26 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
((RoomActivity) getActivity()).upYs(false);
|
||||
}
|
||||
}
|
||||
isShowCardRelationshipFragment = -2;
|
||||
|
||||
if (messageEvent.getText().getFromUserInfo().getUser_id() == SpUtil.getUserId()) {
|
||||
CardRelationshipFragment.show(roomInfoResp.getRoom_info().getRoom_id(), SpUtil.getUserId() + "", type + "", getActivity().getSupportFragmentManager());
|
||||
isShowCardRelationshipFragment = CardRelationshipFragment.show(roomInfoResp.getRoom_info().getRoom_id(),
|
||||
SpUtil.getUserId() + "", type + "", getActivity().getSupportFragmentManager(), dialogFragment -> {
|
||||
this.dialogFragment = dialogFragment;
|
||||
});
|
||||
}
|
||||
} else if (messageEvent.getText().getType() == 2) {//拍卖位下麦
|
||||
if (messageEvent.getText().getPit_number().equals("9")) {
|
||||
wheatView.setData(getPitBean2(messageEvent, "9"));
|
||||
} else if (messageEvent.getText().getPit_number().equals("888")) {
|
||||
wheatView2.setData(getPitBean2(messageEvent, "888"));
|
||||
try {
|
||||
if (dialogFragment != null){
|
||||
dialogFragment.dismiss();
|
||||
}
|
||||
}catch (Exception e){
|
||||
LogUtils.e("RoomAuctionFragment", "event1022: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
yinc();
|
||||
}
|
||||
@@ -949,7 +976,11 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
getvjs();
|
||||
// imActionYs.setVisibility(GONE);
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).upJs(false);
|
||||
if (getHostUser() < 4){
|
||||
((RoomActivity) getActivity()).upJs(true);
|
||||
}else {
|
||||
((RoomActivity) getActivity()).upJs(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (messageEvent.getText().getAuction_user().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
|
||||
@@ -13,6 +13,7 @@ import androidx.fragment.app.FragmentManager;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.adapter.CardRelationAdapter;
|
||||
import com.xscm.modulemain.activity.room.contacts.CardRelationshipContacts;
|
||||
@@ -34,11 +35,11 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/28
|
||||
*@description: 卡关系弹框
|
||||
* @author qx
|
||||
* @data 2025/6/28
|
||||
* @description: 卡关系弹框
|
||||
*/
|
||||
public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelationshipPresenter, DialogCardRelationBinding> implements CardRelationshipContacts.View{
|
||||
public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelationshipPresenter, DialogCardRelationBinding> implements CardRelationshipContacts.View {
|
||||
|
||||
private String type;
|
||||
private String roomId;
|
||||
@@ -46,7 +47,7 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
private CardRelationAdapter adapter;
|
||||
private List<ViewItem> viewItems = new ArrayList<>();
|
||||
|
||||
private RoomAuctionABean roomAuctionABean;
|
||||
private RoomAuctionABean roomAuctionABean;
|
||||
RoomRelationBean roomRelationBean;
|
||||
RoomAutionTimeBean roomAutionTimeBean;
|
||||
RoonGiftModel roonGiftModel;
|
||||
@@ -56,16 +57,33 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
return new CardRelationshipPresenter(this, getActivity());
|
||||
}
|
||||
|
||||
public interface OnCardRelationListener{
|
||||
void OnCardRelationListener(CardRelationshipFragment dialogFragment);
|
||||
}
|
||||
|
||||
public static void show(String roomId, String userId,String type, FragmentManager fragmentManager) {
|
||||
CardRelationshipFragment dialogFragment = new CardRelationshipFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString("roomId", roomId);
|
||||
args.putString("userId", userId);
|
||||
args.putString("type", type);
|
||||
dialogFragment.setArguments(args);
|
||||
dialogFragment.show(fragmentManager, "CardRelationshipFragment");
|
||||
|
||||
public static int show(String roomId, String userId, String type, FragmentManager fragmentManager,OnCardRelationListener onCardRelationListener) {
|
||||
//activity 退到后台调用闪退
|
||||
try {
|
||||
// 检查 FragmentManager 状态
|
||||
if (fragmentManager.isDestroyed() || fragmentManager.isStateSaved()) {
|
||||
return -1;
|
||||
}
|
||||
CardRelationshipFragment dialogFragment = new CardRelationshipFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString("roomId", roomId);
|
||||
args.putString("userId", userId);
|
||||
args.putString("type", type);
|
||||
dialogFragment.setArguments(args);
|
||||
dialogFragment.show(fragmentManager, "CardRelationshipFragment");
|
||||
onCardRelationListener.OnCardRelationListener(dialogFragment);
|
||||
return 0;
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("CardRelationshipFragment", "show: " + e.getMessage());
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
@@ -79,6 +97,7 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
MvpPre.roomRelationList(type);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
@@ -86,7 +105,8 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
if (window != null) {
|
||||
// 设置固定高度为 500dp
|
||||
int screenHeight = getResources().getDisplayMetrics().heightPixels;
|
||||
int heightInDp = (int) (screenHeight * 0.6f);;
|
||||
int heightInDp = (int) (screenHeight * 0.6f);
|
||||
;
|
||||
int heightInPx = (int) heightInDp;
|
||||
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, heightInPx);
|
||||
|
||||
@@ -97,12 +117,14 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
getDialog().setCancelable(false);
|
||||
getDialog().setCanceledOnTouchOutside(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initDialogStyle(Window window) {
|
||||
super.initDialogStyle(window);
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
setStyle(DialogFragment.STYLE_NORMAL, com.xscm.moduleutil.R.style.CustomDialogFragmentTheme);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
RecyclerView recyclerView = mBinding.recycleView;
|
||||
@@ -117,11 +139,11 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
case ViewItem.TYPE_TEXT: // 文本占满整行
|
||||
return 4;
|
||||
case ViewItem.TYPE_RELATION: // 每行 2 个
|
||||
return 1;
|
||||
return 1;
|
||||
case ViewItem.TYPE_GIFT: // 每行 3 个
|
||||
return 1; // 3 个时,总列数 3,则每项占 1 列;若总列数为 4,则需调整
|
||||
case ViewItem.TYPE_IMAGE_SELECTION: // 每行 4 个
|
||||
return 1;
|
||||
return 1;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
@@ -129,7 +151,7 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
});
|
||||
adapter = new CardRelationAdapter();
|
||||
recyclerView.setAdapter(adapter);
|
||||
roomAuctionABean=new RoomAuctionABean();
|
||||
roomAuctionABean = new RoomAuctionABean();
|
||||
|
||||
// 模拟从网络获取 RoomAuctionABean 数据
|
||||
|
||||
@@ -138,23 +160,23 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
mBinding.tvWheatQd.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
roomRelationBean = adapter.getSelectedRelation();
|
||||
roomAutionTimeBean = adapter.getSelectedTime();
|
||||
roonGiftModel = adapter.getSelectedGift();
|
||||
if (type.equals("2")){
|
||||
roomRelationBean = adapter.getSelectedRelation();
|
||||
roomAutionTimeBean = adapter.getSelectedTime();
|
||||
roonGiftModel = adapter.getSelectedGift();
|
||||
if (type.equals("2")) {
|
||||
if (roomRelationBean != null && roomAutionTimeBean != null && roonGiftModel != null) {
|
||||
// 创建一个 RoomAuctionABean 对象
|
||||
MvpPre.roomAuction(roomId, userId, roonGiftModel.getGift_id(), roomRelationBean.getRelation_id(), "2", roomAutionTimeBean.getHours()+"");
|
||||
}else {
|
||||
MvpPre.roomAuction(roomId, userId, roonGiftModel.getGift_id(), roomRelationBean.getRelation_id(), "2", roomAutionTimeBean.getHours() + "");
|
||||
} else {
|
||||
ToastUtils.show("请选择竞拍信息");
|
||||
}
|
||||
}else {
|
||||
if (roomRelationBean != null&& roonGiftModel != null){
|
||||
} else {
|
||||
if (roomRelationBean != null && roonGiftModel != null) {
|
||||
|
||||
// MvpPre.roomAuctionTime(roonGiftModel.getGift_id());
|
||||
MvpPre.roomAuction(roomId, userId, roonGiftModel.getGift_id(), roomRelationBean.getRelation_id(), "1", "");
|
||||
|
||||
}else {
|
||||
} else {
|
||||
ToastUtils.show("请选择竞拍信息");
|
||||
}
|
||||
}
|
||||
@@ -173,10 +195,10 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
|
||||
@Override
|
||||
public void roomRelationList(List<RoomRelationBean> roomRelationBeans) {
|
||||
if (roomRelationBeans!=null) {
|
||||
if (roomRelationBeans != null) {
|
||||
roomAuctionABean.setRoomRelationBeanList(roomRelationBeans);
|
||||
MvpPre.getGiftList("99");
|
||||
}else {
|
||||
} else {
|
||||
ToastUtils.show("数据接口错误");
|
||||
}
|
||||
|
||||
@@ -184,7 +206,7 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
|
||||
@Override
|
||||
public void setGiftList(List<RoonGiftModel> roonGiftModels) {
|
||||
if (roonGiftModels!=null) {
|
||||
if (roonGiftModels != null) {
|
||||
roomAuctionABean.setRoomGiftBeanList(roonGiftModels);
|
||||
upList();
|
||||
}
|
||||
@@ -204,7 +226,7 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
}
|
||||
|
||||
|
||||
private void upList(){
|
||||
private void upList() {
|
||||
if (roomAuctionABean != null) {
|
||||
// 添加文本项
|
||||
viewItems.add(new ViewItem(ViewItem.TYPE_TEXT, "选择关系"));
|
||||
@@ -214,7 +236,7 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
viewItems.add(new ViewItem(ViewItem.TYPE_RELATION, bean));
|
||||
}
|
||||
|
||||
if (type.equals("2")){
|
||||
if (type.equals("2")) {
|
||||
viewItems.add(new ViewItem(ViewItem.TYPE_TEXT, "选择时长"));
|
||||
for (RoomAutionTimeBean bean : getDefaultTimeOptions()) {
|
||||
viewItems.add(new ViewItem(ViewItem.TYPE_IMAGE_SELECTION, bean));
|
||||
|
||||
@@ -24,6 +24,7 @@ import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.moduleutil.bean.room.RoomAuction;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
@@ -36,11 +37,11 @@ public class CustomCenterDialogFragment extends DialogFragment {
|
||||
RoomAuction.AuctionListBean recipient;
|
||||
RoomAuction.AuctionUserBean auction_user;
|
||||
private OnDialogActionListener listener;
|
||||
GifAvatarOvalView avatar1,za_avatar1;
|
||||
GifAvatarOvalView avatar2,za_avatar2;
|
||||
private TextView tv_tname,tv_za_tname;
|
||||
private TextView tv_name1,tv_za_name1;
|
||||
private TextView tv_name2,tv_za_name2;
|
||||
GifAvatarOvalView avatar1, za_avatar1;
|
||||
GifAvatarOvalView avatar2, za_avatar2;
|
||||
private TextView tv_tname, tv_za_tname;
|
||||
private TextView tv_name1, tv_za_name1;
|
||||
private TextView tv_name2, tv_za_name2;
|
||||
ConstraintLayout constraintLayout_qm, constraintLayout2_za;
|
||||
|
||||
public interface OnDialogActionListener {
|
||||
@@ -53,24 +54,39 @@ public class CustomCenterDialogFragment extends DialogFragment {
|
||||
}
|
||||
|
||||
public static void show(RoomAuction.AuctionListBean recipient, RoomAuction.AuctionUserBean auction_user, FragmentManager fragmentManager) {
|
||||
CustomCenterDialogFragment fragment = new CustomCenterDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putSerializable("recipient", recipient);
|
||||
args.putSerializable("auction_user", auction_user);
|
||||
fragment.setArguments(args);
|
||||
fragment.show(fragmentManager, "CustomCenterDialogFragment");
|
||||
//activity 退到后台调用闪退
|
||||
try {
|
||||
// 检查 FragmentManager 状态
|
||||
if (fragmentManager.isDestroyed() || fragmentManager.isStateSaved()) {
|
||||
return;
|
||||
}
|
||||
CustomCenterDialogFragment fragment = new CustomCenterDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putSerializable("recipient", recipient);
|
||||
args.putSerializable("auction_user", auction_user);
|
||||
fragment.setArguments(args);
|
||||
fragment.show(fragmentManager, "CustomCenterDialogFragment");
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("CustomCenterDialogFragment", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static void showWithAutoDismiss(RoomAuction.AuctionListBean recipient,
|
||||
RoomAuction.AuctionUserBean auction_user,
|
||||
FragmentManager fragmentManager) {
|
||||
CustomCenterDialogFragment fragment = new CustomCenterDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putSerializable("recipient", recipient);
|
||||
args.putSerializable("auction_user", auction_user);
|
||||
fragment.setArguments(args);
|
||||
//activity 退到后台调用闪退
|
||||
try {
|
||||
// 检查 FragmentManager 状态
|
||||
if (fragmentManager.isDestroyed() || fragmentManager.isStateSaved()) {
|
||||
return;
|
||||
}
|
||||
CustomCenterDialogFragment fragment = new CustomCenterDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putSerializable("recipient", recipient);
|
||||
args.putSerializable("auction_user", auction_user);
|
||||
fragment.setArguments(args);
|
||||
|
||||
fragment.show(fragmentManager, "CustomCenterDialogFragment");
|
||||
fragment.show(fragmentManager, "CustomCenterDialogFragment");
|
||||
|
||||
// new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
// if (fragment.isAdded()) {
|
||||
@@ -78,25 +94,29 @@ public class CustomCenterDialogFragment extends DialogFragment {
|
||||
// }
|
||||
// }, 4000); // 4秒后关闭
|
||||
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
try {
|
||||
if (fragment.isAdded() &&
|
||||
!fragment.isRemoving() &&
|
||||
!fragment.isDetached() &&
|
||||
fragment.getActivity() != null &&
|
||||
!fragment.getActivity().isFinishing() &&
|
||||
!fragment.getActivity().isDestroyed()) {
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
try {
|
||||
if (fragment.isAdded() &&
|
||||
!fragment.isRemoving() &&
|
||||
!fragment.isDetached() &&
|
||||
fragment.getActivity() != null &&
|
||||
!fragment.getActivity().isFinishing() &&
|
||||
!fragment.getActivity().isDestroyed()) {
|
||||
|
||||
if (fragment.getFragmentManager() != null && !fragment.getFragmentManager().isStateSaved()) {
|
||||
fragment.dismiss();
|
||||
} else {
|
||||
fragment.dismissAllowingStateLoss();
|
||||
if (fragment.getFragmentManager() != null && !fragment.getFragmentManager().isStateSaved()) {
|
||||
fragment.dismiss();
|
||||
} else {
|
||||
fragment.dismissAllowingStateLoss();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("CustomCenterDialogFragment", e.getMessage());
|
||||
// 安全地忽略异常
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 安全地忽略异常
|
||||
}
|
||||
}, 4000); // 4秒后关闭
|
||||
}, 4000); // 4秒后关闭
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("CustomCenterDialogFragment", e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -112,7 +132,6 @@ public class CustomCenterDialogFragment extends DialogFragment {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
@@ -126,41 +145,42 @@ public class CustomCenterDialogFragment extends DialogFragment {
|
||||
window.setGravity(Gravity.CENTER);
|
||||
}
|
||||
|
||||
avatar1= dialog.findViewById(R.id.avatar1);
|
||||
avatar2= dialog.findViewById(R.id.avatar2);
|
||||
tv_name1= dialog.findViewById(R.id.tv_name1);
|
||||
tv_name2= dialog.findViewById(R.id.tv_name2);
|
||||
tv_tname= dialog.findViewById(R.id.tv_tname);
|
||||
avatar1 = dialog.findViewById(R.id.avatar1);
|
||||
avatar2 = dialog.findViewById(R.id.avatar2);
|
||||
tv_name1 = dialog.findViewById(R.id.tv_name1);
|
||||
tv_name2 = dialog.findViewById(R.id.tv_name2);
|
||||
tv_tname = dialog.findViewById(R.id.tv_tname);
|
||||
|
||||
za_avatar1= dialog.findViewById(R.id.za_avatar1);
|
||||
za_avatar2= dialog.findViewById(R.id.za_avatar2);
|
||||
tv_za_name1= dialog.findViewById(R.id.tv_za_name1);
|
||||
tv_za_name2= dialog.findViewById(R.id.tv_za_name2);
|
||||
tv_za_tname= dialog.findViewById(R.id.tv_tname_za);
|
||||
za_avatar1 = dialog.findViewById(R.id.za_avatar1);
|
||||
za_avatar2 = dialog.findViewById(R.id.za_avatar2);
|
||||
tv_za_name1 = dialog.findViewById(R.id.tv_za_name1);
|
||||
tv_za_name2 = dialog.findViewById(R.id.tv_za_name2);
|
||||
tv_za_tname = dialog.findViewById(R.id.tv_tname_za);
|
||||
|
||||
constraintLayout_qm= dialog.findViewById(R.id.cl_container);
|
||||
constraintLayout2_za= dialog.findViewById(R.id.cl_container_za);
|
||||
if (auction_user.getAuction_type().equals("2")){
|
||||
constraintLayout_qm = dialog.findViewById(R.id.cl_container);
|
||||
constraintLayout2_za = dialog.findViewById(R.id.cl_container_za);
|
||||
if (auction_user.getAuction_type().equals("2")) {
|
||||
constraintLayout_qm.setVisibility(View.VISIBLE);
|
||||
constraintLayout2_za.setVisibility(View.GONE);
|
||||
ImageUtils.loadHeadCC(recipient.getAvatar(),avatar1);
|
||||
ImageUtils.loadHeadCC(auction_user.getAvatar(),avatar2);
|
||||
ImageUtils.loadHeadCC(recipient.getAvatar(), avatar1);
|
||||
ImageUtils.loadHeadCC(auction_user.getAvatar(), avatar2);
|
||||
tv_name1.setText(recipient.getNickname());
|
||||
tv_name2.setText(auction_user.getNickname());
|
||||
tv_tname.setText(auction_user.getRelation_name()+"关系竞拍成功");
|
||||
tv_tname.setText(auction_user.getRelation_name() + "关系竞拍成功");
|
||||
setTextViewGradient(tv_tname, ContextCompat.getColor(getContext(), com.xscm.moduleutil.R.color.color_FFFFF0F0), ContextCompat.getColor(getContext(), com.xscm.moduleutil.R.color.color_FFA4C8));
|
||||
}else {
|
||||
} else {
|
||||
constraintLayout_qm.setVisibility(View.GONE);
|
||||
constraintLayout2_za.setVisibility(View.VISIBLE);
|
||||
ImageUtils.loadHeadCC(recipient.getAvatar(),za_avatar1);
|
||||
ImageUtils.loadHeadCC(auction_user.getAvatar(),za_avatar2);
|
||||
ImageUtils.loadHeadCC(recipient.getAvatar(), za_avatar1);
|
||||
ImageUtils.loadHeadCC(auction_user.getAvatar(), za_avatar2);
|
||||
tv_za_name1.setText(recipient.getNickname());
|
||||
tv_za_name2.setText(auction_user.getNickname());
|
||||
tv_za_tname.setText(auction_user.getRelation_name()+"关系竞拍成功");
|
||||
tv_za_tname.setText(auction_user.getRelation_name() + "关系竞拍成功");
|
||||
}
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
private void setTextViewGradient(TextView textView, int startColor, int endColor) {
|
||||
Shader shader = new LinearGradient(
|
||||
0, 0, textView.getPaint().getTextSize() * textView.length(), 0,
|
||||
@@ -169,6 +189,7 @@ public class CustomCenterDialogFragment extends DialogFragment {
|
||||
Shader.TileMode.CLAMP);
|
||||
textView.getPaint().setShader(shader);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
Reference in New Issue
Block a user