红包打开创建领取的样式逻辑构建
This commit is contained in:
parent
279575d80b
commit
40455fffc9
@ -0,0 +1,73 @@
|
||||
package com.yunbao.common.views.weight;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.RectF;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
public class CircleProgress extends View {
|
||||
private Paint mPaint;
|
||||
private RectF mRectF;
|
||||
private int mCurrent = 1, mMax = 100;
|
||||
//圆弧(也可以说是圆环)的宽度
|
||||
private float mArcWidth =8;
|
||||
//控件的宽度
|
||||
private float mWidth;
|
||||
|
||||
public CircleProgress(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public CircleProgress(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public CircleProgress(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
mPaint = new Paint();
|
||||
mPaint.setAntiAlias(true);
|
||||
mRectF = new RectF();
|
||||
}
|
||||
|
||||
public void setCurrent(int mCurrent) {
|
||||
this.mCurrent = mCurrent;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setMax(int mMax) {
|
||||
this.mMax = mMax;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
//getMeasuredWidth获取的是view的原始大小,也就是xml中配置或者代码中设置的大小
|
||||
//getWidth获取的是view最终显示的大小,这个大小不一定等于原始大小
|
||||
mWidth = getMeasuredWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
mPaint.setStyle(Paint.Style.STROKE);
|
||||
//设置圆弧的宽度(圆环的宽度)
|
||||
mPaint.setStrokeWidth(mArcWidth);
|
||||
mPaint.setColor(Color.parseColor("#FF98A2"));
|
||||
//大圆的半径
|
||||
float bigCircleRadius = mWidth / 2;
|
||||
//小圆的半径
|
||||
float smallCircleRadius = bigCircleRadius - mArcWidth;
|
||||
//绘制小圆
|
||||
canvas.drawCircle(bigCircleRadius, bigCircleRadius, smallCircleRadius, mPaint);
|
||||
mPaint.setColor(Color.parseColor("#FFF7CD"));
|
||||
mRectF.set(mArcWidth, mArcWidth, mWidth - mArcWidth, mWidth - mArcWidth);
|
||||
//绘制圆弧
|
||||
canvas.drawArc(mRectF, -90, mCurrent * 360 / mMax, false, mPaint);
|
||||
setBackgroundColor(Color.parseColor("#FD2D48"));
|
||||
}
|
||||
|
||||
}
|
@ -1205,4 +1205,22 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="total_consumption_of_drill">共計消耗%s鑚</string>
|
||||
<string name="top_up_now">去充值></string>
|
||||
<string name="range_range_is">范围区间为[%s]</string>
|
||||
<string name="red_packet_value">价值</string>
|
||||
<string name="red_packet_open">開</string>
|
||||
<string name="randomly_available">隨機可得</string>
|
||||
<string name="build_up_popularity">攢人氣</string>
|
||||
<string name="send_red_packet_illustrate1">1.在直播間發紅包有什麽好處?</string>
|
||||
<string name="send_red_packet_illustrate2">有紅包的直播間會給新增熱度,吸引更多用戶觀看直播</string>
|
||||
<string name="send_red_packet_illustrate3">2.紅包發給誰?</string>
|
||||
<string name="send_red_packet_illustrate4">紅包發出后,直播間所有用戶都可搶,包括自己</string>
|
||||
<string name="send_red_packet_illustrate5">3.紅包怎麽發?</string>
|
||||
<string name="send_red_packet_illustrate6">紅包同爲禮物,20%鑽石獎勵給主播,剩餘70%的鑽石會以【1鑽石=1金豆】的比列兌換成金豆塞進紅包内給直播間觀看領取,剩餘10%隨機包成鑽石禮物包進紅包裹,另平臺設有紅包目標任務,每連成一個目標,平臺將獎勵目標紅包 數總價值的2%開設超級獎池供所有目標用戶抽取</string>
|
||||
<string name="send_red_packet_illustrate7">4.未被領取的紅包如何處理?</string>
|
||||
<string name="send_red_packet_illustrate8">紅包打開后未被領取,以及主播下播后未打開的紅包,會退回您的賬戶</string>
|
||||
<string name="send_red_packet_illustrate9">5.搶到的紅包能幹嘛?</string>
|
||||
<string name="send_red_packet_illustrate10">搶到紅包所得金豆可用於平臺一切金豆行爲,不轉增,不可體現</string>
|
||||
<string name="congratulations_on_getting_the_red_envelope">恭喜搶到紅包</string>
|
||||
<string name="cred_envelope_obtained">獲得%s</string>
|
||||
<string name="view_lucky_viewers">查看幸運觀衆></string>
|
||||
<string name="anchor_his_heart">贈送主播禮物表達心意</string>
|
||||
</resources>
|
||||
|
@ -1,13 +1,8 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -20,7 +15,10 @@ import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
@ -31,9 +29,10 @@ import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.GiftCacheUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.custom.GiftMarkView;
|
||||
import com.yunbao.live.dialog.SendRendPacketPopup;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
@ -77,7 +76,7 @@ public class LiveGiftAdapter extends RecyclerView.Adapter<LiveGiftAdapter.Vh> {
|
||||
if (tag != null) {
|
||||
int position = (int) tag;
|
||||
LiveGiftBean bean = mList.get(position);
|
||||
if (!bean.isChecked()) {
|
||||
if (!bean.isChecked() && bean.getType() != 9999999) {
|
||||
if (!cancelChecked()) {
|
||||
if (mActionListener != null) {
|
||||
mActionListener.onCancel();
|
||||
@ -196,7 +195,7 @@ public class LiveGiftAdapter extends RecyclerView.Adapter<LiveGiftAdapter.Vh> {
|
||||
tvRedpoint = (TextView) itemView.findViewById(R.id.tvRedpoint);
|
||||
mPayico = (ImageView) itemView.findViewById(R.id.pay_ico);
|
||||
expire = (TextView) itemView.findViewById(R.id.expire);
|
||||
mRadioButton.setOnClickListener(mOnClickListener);
|
||||
|
||||
mLoading = itemView.findViewById(R.id.gift_loading);
|
||||
mLoadingLayout = itemView.findViewById(R.id.gift_loading_layout);
|
||||
mLoadingLayout.setOnClickListener(v -> {
|
||||
@ -235,8 +234,24 @@ public class LiveGiftAdapter extends RecyclerView.Adapter<LiveGiftAdapter.Vh> {
|
||||
}
|
||||
if (payload == null) {
|
||||
ImgLoader.display(mContext, bean.getIcon(), mIcon);
|
||||
bean.setView(mIcon);
|
||||
mName.setText(bean.getName());
|
||||
if (bean.getType() == 9999999) {
|
||||
mPayico.setVisibility(View.GONE);
|
||||
mPrice.setText(mContext.getString(R.string.build_up_popularity));
|
||||
mPrice.setTextColor(Color.parseColor("#db8c4a"));
|
||||
ViewClicksAntiShake.clicksAntiShake(mRadioButton, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new SendRendPacketPopup(mContext))
|
||||
.show();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
mRadioButton.setOnClickListener(mOnClickListener);
|
||||
mPrice.setTextColor(Color.parseColor("#c8c8c8"));
|
||||
mPayico.setVisibility(View.VISIBLE);
|
||||
bean.setView(mIcon);
|
||||
if (bean.getSendType() != null && bean.getSendType().equals("1")) {
|
||||
// mCoinName = mName2;
|
||||
mPayico.setImageResource(R.mipmap.gold_coin);
|
||||
@ -245,6 +260,7 @@ public class LiveGiftAdapter extends RecyclerView.Adapter<LiveGiftAdapter.Vh> {
|
||||
mPayico.setImageResource(R.mipmap.diamond);
|
||||
}
|
||||
mPrice.setText(bean.getPrice());
|
||||
}
|
||||
|
||||
if (IMLoginManager.get(mContext).isNewUserGif() && position == 0 && bean.getTag() != null) {
|
||||
mPayico.setVisibility(View.GONE);
|
||||
@ -295,6 +311,7 @@ public class LiveGiftAdapter extends RecyclerView.Adapter<LiveGiftAdapter.Vh> {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
mRadioButton.setTag(position);
|
||||
mRadioButton.doChecked(bean.isChecked());
|
||||
|
@ -41,6 +41,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.opensource.svgaplayer.SVGACallback;
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
@ -728,8 +729,10 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
}
|
||||
mBeanFromWish = null;
|
||||
}
|
||||
|
||||
if (bean.getType() != 9999999) {
|
||||
itemCheckOp(bean);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void itemCheckOp(LiveGiftBean bean) {
|
||||
|
@ -0,0 +1,76 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.views.weight.CircleProgress;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
public class ReceiveRendPacketPopup extends CenterPopupView {
|
||||
private CircleProgress circleProgress;
|
||||
private int time = 10;
|
||||
private Button redPacketOpen;
|
||||
private TextView redPacketTimeText;
|
||||
private FrameLayout redPacketTimeLayout;
|
||||
|
||||
public ReceiveRendPacketPopup(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局离开
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.view_receive_red_packet;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
initView();
|
||||
}
|
||||
|
||||
private Handler timeHandler = new Handler();
|
||||
|
||||
private Runnable timeRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (time > 0) {
|
||||
circleProgress.setCurrent(time--);
|
||||
timeHandler.postDelayed(timeRunnable, 1000);
|
||||
redPacketTimeText.setText(String.valueOf(time));
|
||||
} else {
|
||||
redPacketTimeLayout.setVisibility(GONE);
|
||||
redPacketOpen.setVisibility(VISIBLE);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
private void initView() {
|
||||
circleProgress = findViewById(R.id.circleProgress);
|
||||
redPacketOpen = findViewById(R.id.red_packet_open);
|
||||
redPacketTimeText = findViewById(R.id.red_packet_time_text);
|
||||
redPacketTimeLayout = findViewById(R.id.red_packet_time_layout);
|
||||
circleProgress.setMax(time);
|
||||
circleProgress.setCurrent(time);
|
||||
redPacketTimeText.setText(String.valueOf(time));
|
||||
timeHandler.postDelayed(timeRunnable, 1000);
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.red_packet_open), () -> {
|
||||
dismiss();
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new ResultRendPacketPopup(getContext()))
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
|
||||
public class ResultRendPacketPopup extends CenterPopupView {
|
||||
|
||||
|
||||
public ResultRendPacketPopup(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局离开
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.view_result_red_packet;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
initView();
|
||||
}
|
||||
|
||||
|
||||
private void initView() {
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.illustrate_close), () -> dismiss());
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.anchor_his_heart), () -> {
|
||||
dismiss();
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP));
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -1,15 +1,21 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
@ -19,6 +25,8 @@ public class SendRendPacketPopup extends CenterPopupView {
|
||||
private Button thereIsNo, followingAnchor;
|
||||
private TextView redEnvelopeRill, totalConsumptionOfDrill;
|
||||
private TextView rill, total;
|
||||
private FrameLayout redPacketIllustrate;
|
||||
private ImageView iconInstructions, illustrateClose;
|
||||
|
||||
public SendRendPacketPopup(@NonNull Context context) {
|
||||
super(context);
|
||||
@ -42,6 +50,9 @@ public class SendRendPacketPopup extends CenterPopupView {
|
||||
followingAnchor = findViewById(R.id.following_anchor);
|
||||
redEnvelopeRill = findViewById(R.id.red_envelope_rill);
|
||||
totalConsumptionOfDrill = findViewById(R.id.total_consumption_of_drill);
|
||||
redPacketIllustrate = findViewById(R.id.red_packet_illustrate);
|
||||
illustrateClose = findViewById(R.id.illustrate_close);
|
||||
iconInstructions = findViewById(R.id.icon_instructions);
|
||||
rill = findViewById(R.id.rill);
|
||||
total = findViewById(R.id.total);
|
||||
selectText(thereIsNo, true);
|
||||
@ -132,6 +143,12 @@ public class SendRendPacketPopup extends CenterPopupView {
|
||||
//红包初始数量
|
||||
rill.setText("200");
|
||||
total.setText("10");
|
||||
ViewClicksAntiShake.clicksAntiShake(iconInstructions, () -> redPacketIllustrate.setVisibility(VISIBLE));
|
||||
ViewClicksAntiShake.clicksAntiShake(illustrateClose, () -> redPacketIllustrate.setVisibility(GONE));
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.top_up_now), () -> {
|
||||
//我们的
|
||||
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||
});
|
||||
}
|
||||
|
||||
private void selectText(TextView textView, boolean select) {
|
||||
|
@ -152,7 +152,7 @@ import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog;
|
||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveWishListDialogFragment4Audience;
|
||||
import com.yunbao.live.dialog.SendRendPacketPopup;
|
||||
import com.yunbao.live.dialog.ReceiveRendPacketPopup;
|
||||
import com.yunbao.live.event.LiveAnchorEvent;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.live.event.LiveRoomChangeEvent;
|
||||
@ -1414,7 +1414,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new SendRendPacketPopup(mContext))
|
||||
.asCustom(new ReceiveRendPacketPopup(mContext))
|
||||
.show();
|
||||
}
|
||||
});
|
||||
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="320dp" />
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#FBD16C" />
|
||||
<solid android:color="#FD2D48" />
|
||||
</shape>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="23dp" />
|
||||
<solid android:color="#40FFC0D5" />
|
||||
</shape>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="16dp" />
|
||||
<solid android:color="#cc000000" />
|
||||
</shape>
|
@ -746,7 +746,7 @@
|
||||
android:translationX="-48dp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<!--接收-->
|
||||
<FrameLayout
|
||||
android:id="@+id/ft_hot_add"
|
||||
android:layout_width="81dp"
|
||||
|
126
live/src/main/res/layout/view_receive_red_packet.xml
Normal file
126
live/src/main/res/layout/view_receive_red_packet.xml
Normal file
@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/background_red_packet"
|
||||
android:animateLayoutChanges="true"
|
||||
android:backgroundTintMode="src_over">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="171dp"
|
||||
android:background="@mipmap/icon_ellipse" />
|
||||
<!--头像-->
|
||||
<com.yunbao.common.views.weight.ClipPathCircleImage
|
||||
android:id="@+id/head_portrait"
|
||||
android:layout_width="59dp"
|
||||
android:layout_height="59dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="40dp"
|
||||
android:src="@mipmap/hide" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/receive_red"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/head_portrait"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="來自小PD的獎勵,齊心協力連成目標"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/red_packet_value_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/receive_red"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="6dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/red_packet_value"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@mipmap/icon_zhuansi" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="13160"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/red_packet_open"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
android:layout_below="@+id/red_packet_value_layout"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/background_open_red_packet"
|
||||
android:text="@string/red_packet_open"
|
||||
android:textColor="#FFE9BF"
|
||||
android:textSize="36sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/red_packet_time_layout"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
android:layout_below="@+id/red_packet_value_layout"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="12dp">
|
||||
|
||||
<com.yunbao.common.views.weight.CircleProgress
|
||||
android:id="@+id/circleProgress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/red_packet_time_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="0"
|
||||
android:textColor="#FFFFF9"
|
||||
android:textSize="36sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/red_packet_list"
|
||||
android:layout_width="260dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_below="@id/red_packet_open"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="26dp"
|
||||
android:background="@drawable/background_red_packet_list"
|
||||
android:orientation="horizontal">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/red_packet_list"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="27dp"
|
||||
android:text="@string/randomly_available"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
</RelativeLayout>
|
69
live/src/main/res/layout/view_result_red_packet.xml
Normal file
69
live/src/main/res/layout/view_result_red_packet.xml
Normal file
@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
android:background="@mipmap/background_red_packet"
|
||||
android:backgroundTintMode="src_over">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/illustrate_close"
|
||||
android:layout_width="19dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_margin="25dp"
|
||||
android:src="@mipmap/meiyan_icon_close" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="58dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/congratulations_on_getting_the_red_envelope"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="34dp"
|
||||
android:text="@string/cred_envelope_obtained"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="75dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:src="@mipmap/hide" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40dp"
|
||||
android:text="@string/view_lucky_viewers"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/anchor_his_heart"
|
||||
android:layout_width="205dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="34dp"
|
||||
android:background="@drawable/background_send_red_packet"
|
||||
android:gravity="center"
|
||||
android:text="@string/anchor_his_heart"
|
||||
android:textColor="#8F3B00"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
@ -3,6 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
android:background="@mipmap/background_red_packet"
|
||||
android:backgroundTintMode="src_over">
|
||||
|
||||
@ -18,6 +19,7 @@
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_instructions"
|
||||
android:layout_width="19dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_gravity="end"
|
||||
@ -146,7 +148,7 @@
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="22dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="49dp">
|
||||
|
||||
<Button
|
||||
@ -197,23 +199,126 @@
|
||||
android:textSize="12sp" />
|
||||
</FrameLayout>
|
||||
|
||||
<Button
|
||||
<TextView
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginBottom="34dp"
|
||||
android:background="@drawable/background_send_red_packet"
|
||||
android:gravity="center"
|
||||
android:text="@string/red_pack_6"
|
||||
android:textColor="#8F3B00"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/top_up_now"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginBottom="13dp"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/top_up_now"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/top_up_now" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/red_packet_illustrate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/background_send_red_packet_illustrate"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:visibility="gone">
|
||||
<!--结果-->
|
||||
<LinearLayout
|
||||
android:layout_width="245dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="25dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/send_red_packet_illustrate1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/send_red_packet_illustrate2"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="@string/send_red_packet_illustrate3"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/send_red_packet_illustrate4"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="@string/send_red_packet_illustrate5"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/send_red_packet_illustrate6"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="@string/send_red_packet_illustrate7"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/send_red_packet_illustrate8"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="@string/send_red_packet_illustrate9"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/send_red_packet_illustrate10"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/illustrate_close"
|
||||
android:layout_width="19dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_margin="12dp"
|
||||
android:src="@mipmap/meiyan_icon_close" />
|
||||
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
BIN
live/src/main/res/mipmap-xhdpi/icon_ellipse.png
Normal file
BIN
live/src/main/res/mipmap-xhdpi/icon_ellipse.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
Loading…
Reference in New Issue
Block a user