守护弹窗
This commit is contained in:
parent
4d96bcc667
commit
8af7f907eb
@ -45,7 +45,6 @@ public class SudTitleSelectAdapter extends RecyclerView.Adapter {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -0,0 +1,57 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
|
||||
public class GuardBuyTipsDialog {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param context
|
||||
* @param coin 钻石
|
||||
* @param content 购买类型名称
|
||||
* @param simpleCallback
|
||||
*/
|
||||
public static void showBuyOrRenewDialog(Context context, String coin, String content, DialogUitl.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_guard_buy_tips);
|
||||
dialog.setCancelable(true);
|
||||
dialog.setCanceledOnTouchOutside(true);
|
||||
if (!TextUtils.isEmpty(coin)) {
|
||||
TextView contentTextView = dialog.findViewById(R.id.content);
|
||||
contentTextView.setText(context.getString(R.string.guard_buy_tips_1, coin));
|
||||
}
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
TextView buyTypeTextView = dialog.findViewById(R.id.buyType);
|
||||
buyTypeTextView.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();
|
||||
}
|
||||
|
||||
}
|
13
common/src/main/res/drawable/guard_buy_tips_bg.xml
Normal file
13
common/src/main/res/drawable/guard_buy_tips_bg.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="135"
|
||||
android:centerColor="#202020"
|
||||
android:endColor="#535353"
|
||||
android:startColor="#595959" />
|
||||
<corners
|
||||
android:bottomLeftRadius="18dp"
|
||||
android:bottomRightRadius="18dp"
|
||||
android:topLeftRadius="18dp"
|
||||
android:topRightRadius="18dp" />
|
||||
</shape>
|
12
common/src/main/res/drawable/guard_buy_tips_sure_bg.xml
Normal file
12
common/src/main/res/drawable/guard_buy_tips_sure_bg.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="45"
|
||||
android:endColor="#EEC593"
|
||||
android:startColor="#FCDEC4" />
|
||||
<corners
|
||||
android:bottomLeftRadius="18dp"
|
||||
android:bottomRightRadius="18dp"
|
||||
android:topLeftRadius="18dp"
|
||||
android:topRightRadius="18dp" />
|
||||
</shape>
|
74
common/src/main/res/layout/dialog_guard_buy_tips.xml
Normal file
74
common/src/main/res/layout/dialog_guard_buy_tips.xml
Normal file
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="220dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:background="@drawable/guard_buy_tips_bg">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:src="@mipmap/icon_guard_buy_tips_close" />
|
||||
|
||||
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:letterSpacing="0.1"
|
||||
android:text="@string/dialog_tip"
|
||||
android:textSize="22dp"
|
||||
app:gradient_angle="45"
|
||||
app:gradient_endColor="#F9E1AE"
|
||||
app:gradient_startColor="#C28413" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/title"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="30dp"
|
||||
android:letterSpacing="0.1"
|
||||
android:text="@string/guard_buy_tips_1"
|
||||
android:textColor="#FFE0BF"
|
||||
android:textSize="14dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/buyType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:letterSpacing="0.1"
|
||||
android:text="@string/guard_buy_type_1"
|
||||
android:textColor="#FFB974"
|
||||
android:textSize="15dp"
|
||||
android:textStyle="italic|bold" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/guard_buy_tips_sure_bg"
|
||||
android:letterSpacing="0.1"
|
||||
android:text="@string/confirm" />
|
||||
|
||||
</RelativeLayout>
|
BIN
common/src/main/res/mipmap-mdpi/icon_guard_buy_tips_close.png
Normal file
BIN
common/src/main/res/mipmap-mdpi/icon_guard_buy_tips_close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
@ -1450,4 +1450,8 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="community_back">Are you sure to return?</string>
|
||||
|
||||
<string name="back_community_sure">Sure</string>
|
||||
|
||||
<string name="guard_buy_tips_1">您將花費%s鑽石,為主播開通</string>
|
||||
|
||||
<string name="guard_buy_type_1">【星之守护】</string>
|
||||
</resources>
|
||||
|
@ -1449,4 +1449,8 @@
|
||||
<string name="community_back">是否確認返回?</string>
|
||||
|
||||
<string name="back_community_sure">確定</string>
|
||||
|
||||
<string name="guard_buy_tips_1">您將花費%s鑽石,為主播開通</string>
|
||||
|
||||
<string name="guard_buy_type_1">【星之守护】</string>
|
||||
</resources>
|
||||
|
@ -1449,4 +1449,8 @@
|
||||
|
||||
<string name="back_community_sure">確定</string>
|
||||
|
||||
<string name="guard_buy_tips_1">您將花費%s鑽石,為主播開通</string>
|
||||
|
||||
<string name="guard_buy_type_1">【星之守护】</string>
|
||||
|
||||
</resources>
|
||||
|
@ -1446,4 +1446,8 @@
|
||||
|
||||
<string name="back_community_sure">確定</string>
|
||||
|
||||
<string name="guard_buy_tips_1">您將花費%s鑽石,為主播開通</string>
|
||||
|
||||
<string name="guard_buy_type_1">【星之守护】</string>
|
||||
|
||||
</resources>
|
||||
|
@ -1455,4 +1455,8 @@ Limited ride And limited avatar frame</string>
|
||||
|
||||
<string name="back_community_sure">Sure</string>
|
||||
|
||||
<string name="guard_buy_tips_1">您將花費%s鑽石,為主播開通</string>
|
||||
|
||||
<string name="guard_buy_type_1">【星之守护】</string>
|
||||
|
||||
</resources>
|
||||
|
@ -69,6 +69,7 @@ import com.yunbao.live.dialog.LiveInputDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveMicAnchorDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveMoreDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveNewGuardBuyDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveNewGuardDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveNewGuardListDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveRedPackListDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveRedPackSendDialogFragment;
|
||||
@ -1272,7 +1273,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
if (list.isEmpty()) {
|
||||
openNewBuyGuardWindow(true);
|
||||
} else {
|
||||
LiveNewGuardListDialogFragment fragment = new LiveNewGuardListDialogFragment();
|
||||
LiveNewGuardDialogFragment fragment = new LiveNewGuardDialogFragment();
|
||||
fragment.setList(list);
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
|
@ -0,0 +1,239 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.dialog.GuardBuyTipsDialog;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.utils.CommonIconUtil;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.ToastUtils;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.adapter.GuardAdapter;
|
||||
import com.yunbao.live.bean.GuardUserBean;
|
||||
import com.yunbao.live.bean.LiveGuardInfo;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 新版守护列表
|
||||
* 2024/02/22
|
||||
*/
|
||||
public class LiveNewGuardDialogFragment extends AbsDialogFragment implements View.OnClickListener {
|
||||
private ImageView guardIcon, userSex, userLevel;
|
||||
private ConstraintLayout mRootLayout;
|
||||
private CommonRefreshView mRefreshView;
|
||||
private TextView mBtnBuy, userName, userGuard, tip1, tip2;
|
||||
private SVGAImageView giftSvga;
|
||||
private LinearLayout userLayout;
|
||||
|
||||
private GuardAdapter mGuardAdapter;
|
||||
private LiveGuardInfo mLiveGuardInfo;
|
||||
private String mLiveUid;
|
||||
private boolean mIsAnchor;//是否是主播
|
||||
private boolean showBuyView;
|
||||
private List<GuardUserBean> list = new ArrayList<>();
|
||||
private RelativeLayout relativeLayout;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.dialog_new_guard;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getDialogStyle() {
|
||||
return R.style.dialog2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canCancel() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void setLiveGuardInfo(LiveGuardInfo info) {
|
||||
mLiveGuardInfo = info;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setWindowAttributes(Window window) {
|
||||
window.setWindowAnimations(R.style.bottomToTopAnim);
|
||||
WindowManager.LayoutParams params = window.getAttributes();
|
||||
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
params.gravity = Gravity.BOTTOM;
|
||||
window.setAttributes(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
Bundle bundle = getArguments();
|
||||
if (bundle == null) {
|
||||
return;
|
||||
}
|
||||
mIsAnchor = bundle.getBoolean(Constants.ANCHOR, false);
|
||||
mLiveUid = bundle.getString(Constants.LIVE_UID);
|
||||
showBuyView = bundle.getBoolean("showBuyView", true);
|
||||
guardIcon = mRootView.findViewById(R.id.guard_imageView);
|
||||
mRootLayout = mRootView.findViewById(R.id.guard_constraintLayout);
|
||||
mBtnBuy = mRootView.findViewById(R.id.guard_btn_buy);
|
||||
giftSvga = mRootView.findViewById(R.id.gift_svga);
|
||||
mRefreshView = mRootView.findViewById(R.id.refreshView);
|
||||
userName = mRootView.findViewById(R.id.list_guard_list_user_name);
|
||||
userGuard = mRootView.findViewById(R.id.list_guard_list_user_guard);
|
||||
userLevel = mRootView.findViewById(R.id.list_guard_list_user_level);
|
||||
userSex = mRootView.findViewById(R.id.list_guard_list_user_sex);
|
||||
userLayout = mRootView.findViewById(R.id.guard_linearLayout);
|
||||
tip1 = mRootView.findViewById(R.id.guard_tip1);
|
||||
tip2 = mRootView.findViewById(R.id.guard_tip2);
|
||||
relativeLayout = mRootView.findViewById(R.id.guard_relativeLayout);
|
||||
mBtnBuy.setOnClickListener(this);
|
||||
mBtnBuy.setEnabled(true);
|
||||
mBtnBuy.setText(R.string.guard_buy_2);
|
||||
initView();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
mRefreshView.setEmptyLayoutId(mIsAnchor ? R.layout.view_no_data_guard_anc : R.layout.view_no_data_guard_aud);
|
||||
mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||
mGuardAdapter = new GuardAdapter(mContext, true, false);
|
||||
mGuardAdapter.setList(list);
|
||||
setAdapterData();
|
||||
mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<GuardUserBean>() {
|
||||
@Override
|
||||
public RefreshAdapter<GuardUserBean> getAdapter() {
|
||||
if (mGuardAdapter == null) {
|
||||
mGuardAdapter = new GuardAdapter(mContext, true, false);
|
||||
}
|
||||
return mGuardAdapter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadData(int p, HttpCallback callback) {
|
||||
LiveHttpUtil.getGuardList(mLiveUid, p, callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GuardUserBean> processData(String[] info) {
|
||||
List<GuardUserBean> list = JSON.parseArray(Arrays.toString(info), GuardUserBean.class);
|
||||
if (!list.isEmpty()) {
|
||||
LiveNewGuardDialogFragment.this.list = list;
|
||||
setAdapterData();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshSuccess(List<GuardUserBean> list, int listCount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefreshFailure() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreSuccess(List<GuardUserBean> loadItemList, int loadItemCount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMoreFailure() {
|
||||
|
||||
}
|
||||
});
|
||||
mRefreshView.setRecyclerViewAdapter(mGuardAdapter);
|
||||
mGuardAdapter.notifyDataSetChanged();
|
||||
if (!showBuyView) {
|
||||
relativeLayout.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
dismiss();
|
||||
((LiveActivity) mContext).openNewBuyGuardWindow(list.isEmpty());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int show(@NonNull FragmentTransaction transaction, @Nullable String tag) {
|
||||
int show = super.show(transaction, tag);
|
||||
initView();
|
||||
return show;
|
||||
}
|
||||
|
||||
private void setAdapterData() {
|
||||
if (list.isEmpty()) {
|
||||
userLayout.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
GuardUserBean bean = list.get(0);
|
||||
giftSvga.setImageResource(R.mipmap.guardian_img_wings_p);
|
||||
ImgLoader.display(mContext, bean.getAvatar(), guardIcon);
|
||||
guardIcon.setVisibility(View.VISIBLE);
|
||||
userName.setText(bean.getUserNiceName());
|
||||
String guardString = mContext.getString(R.string.guard_week_con);
|
||||
userGuard.setText(guardString + " " + bean.getContribute());
|
||||
userSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
|
||||
new LiveTextRender().getLevelImage(mContext, bean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, userLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
if (mLiveGuardInfo != null) {
|
||||
int guardType = mLiveGuardInfo.getMyGuardType();
|
||||
if (guardType == Constants.GUARD_TYPE_NONE) {
|
||||
tip1.setText(R.string.guard_tip_0);
|
||||
} else if (guardType == Constants.GUARD_TYPE_DAY) {
|
||||
tip1.setText(mContext.getString(R.string.guard_tip_day) + mLiveGuardInfo.getMyGuardEndTime());
|
||||
mBtnBuy.setText(R.string.guard_buy_3);
|
||||
} else if (guardType == Constants.GUARD_TYPE_MONTH) {
|
||||
tip1.setText(mContext.getString(R.string.guard_tip_1) + mLiveGuardInfo.getMyGuardEndTime());
|
||||
mBtnBuy.setText(R.string.guard_buy_3);
|
||||
} else if (guardType == Constants.GUARD_TYPE_YEAR) {
|
||||
tip1.setText(mContext.getString(R.string.guard_tip_2) + mLiveGuardInfo.getMyGuardEndTime());
|
||||
mBtnBuy.setText(R.string.guard_buy_3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setList(List<GuardUserBean> list) {
|
||||
this.list = list;
|
||||
}
|
||||
}
|
12
live/src/main/res/drawable/guard_buy_bottom_bg.xml
Normal file
12
live/src/main/res/drawable/guard_buy_bottom_bg.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="45"
|
||||
android:endColor="#3B217D"
|
||||
android:startColor="#181F3B" />
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="0dp"
|
||||
android:topRightRadius="0dp" />
|
||||
</shape>
|
13
live/src/main/res/drawable/guard_buy_center_bg.xml
Normal file
13
live/src/main/res/drawable/guard_buy_center_bg.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="-45"
|
||||
android:centerColor="#090522"
|
||||
android:endColor="#0E1633"
|
||||
android:startColor="#2C1661" />
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />
|
||||
</shape>
|
13
live/src/main/res/drawable/guard_buy_top_bg.xml
Normal file
13
live/src/main/res/drawable/guard_buy_top_bg.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="45"
|
||||
android:centerColor="#220A3C"
|
||||
android:endColor="#0E1633"
|
||||
android:startColor="#0E1633" />
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />
|
||||
</shape>
|
213
live/src/main/res/layout/dialog_new_guard.xml
Normal file
213
live/src/main/res/layout/dialog_new_guard.xml
Normal file
@ -0,0 +1,213 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:clipChildren="false">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/guard_rootView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="52dp"
|
||||
android:background="@drawable/guard_buy_top_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/guard_linearLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginTop="52dp"
|
||||
android:layout_marginBottom="21dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toTopOf="@+id/guard_constraintLayout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/list_guard_list_user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/list_guard_list_user_sex"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/list_guard_list_user_level"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="15dp"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/list_guard_list_user_guard"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/guard_constraintLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="365dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:background="@drawable/guard_buy_center_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/guard_linearLayout">
|
||||
|
||||
<com.yunbao.common.custom.CommonRefreshView
|
||||
android:id="@+id/refreshView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
app:crv_loadMoreEnable="false"
|
||||
app:crv_refreshEnable="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/guard_relativeLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="77dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:background="@drawable/guard_buy_bottom_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/guard_constraintLayout">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/guard_tip_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="25dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.yunbao.common.views.weight.MarqueeTextView
|
||||
android:id="@+id/guard_tip1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text=""
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<com.yunbao.common.views.weight.MarqueeTextView
|
||||
android:id="@+id/guard_tip2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/guard_coin_name"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:drawablePadding="4dp"
|
||||
android:text="456"
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textColor="#A281FD"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/guard_btn_buy"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="30dp"
|
||||
android:singleLine="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@drawable/bg_guard_btn_buy"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:text="@string/guard_buy_2"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="243dp"
|
||||
android:layout_height="117dp"
|
||||
android:layout_above="@id/guard_rootView"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="-102dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/guard_imageView"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="58dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/guardian_img_wings"
|
||||
android:visibility="visible"
|
||||
app:riv_oval="true" />
|
||||
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/gift_svga"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/guardian_img_wings"
|
||||
android:visibility="visible"
|
||||
app:autoPlay="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
@ -1,28 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="200dp"
|
||||
android:layout_below="@id/guard_num"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="88dp"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:src="@mipmap/icon_guard_top_0"
|
||||
android:src="@mipmap/icon_guard_top_11"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:text="@string/guard_no_data_2"
|
||||
android:textColor="@color/gray1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
@ -1,28 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="200dp"
|
||||
android:layout_below="@id/guard_num"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="88dp"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:src="@mipmap/icon_guard_top_0"
|
||||
android:src="@mipmap/icon_guard_top_11"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:text="@string/guard_no_data"
|
||||
android:textColor="@color/gray1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
BIN
live/src/main/res/mipmap-mdpi/icon_guard_top_11.png
Normal file
BIN
live/src/main/res/mipmap-mdpi/icon_guard_top_11.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 81 KiB |
@ -819,6 +819,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
}
|
||||
}
|
||||
});
|
||||
new XPopup.Builder(mContext).isDestroyOnDismiss(true).dismissOnBackPressed(false) // 按返回键是否关闭弹窗,默认为true
|
||||
.dismissOnTouchOutside(false) // 点击外部是否关闭弹窗,默认为true
|
||||
.asCustom(new APKUpdateCustomPopup(mContext, false)).show();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user