添加盲盒礼物蒙版
This commit is contained in:
parent
c3b5f17f44
commit
9c32c6af25
@ -101,7 +101,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
private ViewPager mVPWrapList;
|
private ViewPager mVPWrapList;
|
||||||
private RadioGroup mRadioGroup, mRGroupWrap;
|
private RadioGroup mRadioGroup, mRGroupWrap;
|
||||||
private View mLoading;
|
private View mLoading;
|
||||||
private View mArrow;
|
private View mArrow, iconMasking;
|
||||||
private View mBtnSend;
|
private View mBtnSend;
|
||||||
private View mBtnSendGroup;
|
private View mBtnSendGroup;
|
||||||
private View mBtnSendLian;
|
private View mBtnSendLian;
|
||||||
@ -215,6 +215,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
progressBlind1 = mRootView.findViewById(R.id.progress_blind2);
|
progressBlind1 = mRootView.findViewById(R.id.progress_blind2);
|
||||||
progressBlind2 = mRootView.findViewById(R.id.progress_blind3);
|
progressBlind2 = mRootView.findViewById(R.id.progress_blind3);
|
||||||
mArrow = mRootView.findViewById(R.id.arrow);
|
mArrow = mRootView.findViewById(R.id.arrow);
|
||||||
|
iconMasking = mRootView.findViewById(R.id.icon_masking);
|
||||||
blindSvga = mRootView.findViewById(R.id.blind_svga);
|
blindSvga = mRootView.findViewById(R.id.blind_svga);
|
||||||
mBtnSend = mRootView.findViewById(R.id.btn_send);
|
mBtnSend = mRootView.findViewById(R.id.btn_send);
|
||||||
mBtnSendGroup = mRootView.findViewById(R.id.btn_send_group);
|
mBtnSendGroup = mRootView.findViewById(R.id.btn_send_group);
|
||||||
@ -810,6 +811,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF682")), dressNameIndexOf, dressNameIndexOf + dressNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF682")), dressNameIndexOf, dressNameIndexOf + dressNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF682")), individualDressingIndexOf, individualDressingIndexOf + individualDressingSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF682")), individualDressingIndexOf, individualDressingIndexOf + individualDressingSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
blindNumber.setText(builder);
|
blindNumber.setText(builder);
|
||||||
|
iconMasking.setAlpha(0.f);
|
||||||
} else {
|
} else {
|
||||||
int progress = Integer.parseInt(model.getThresholdValue()) - Integer.parseInt(model.getDressThresholdValue());
|
int progress = Integer.parseInt(model.getThresholdValue()) - Integer.parseInt(model.getDressThresholdValue());
|
||||||
String msg = mContext.getString(R.string.resend_win);
|
String msg = mContext.getString(R.string.resend_win);
|
||||||
@ -828,6 +830,8 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
.append("/")
|
.append("/")
|
||||||
.append(model.getThresholdValue());
|
.append(model.getThresholdValue());
|
||||||
textBlindProgress.setText(stringBuffer.toString());
|
textBlindProgress.setText(stringBuffer.toString());
|
||||||
|
float maskingAlpha = (float) progress / Float.parseFloat(model.getThresholdValue());
|
||||||
|
iconMasking.setAlpha(maskingAlpha);
|
||||||
}
|
}
|
||||||
//盲盒礼物文字跑马灯
|
//盲盒礼物文字跑马灯
|
||||||
for (int i = 0; i < model.getItemName().size(); i++) {
|
for (int i = 0; i < model.getItemName().size(); i++) {
|
||||||
@ -1106,6 +1110,8 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
.append("/")
|
.append("/")
|
||||||
.append(model.getThresholdValue());
|
.append(model.getThresholdValue());
|
||||||
textBlindProgress.setText(stringBuffer.toString());
|
textBlindProgress.setText(stringBuffer.toString());
|
||||||
|
float maskingAlpha = (float) progress / Float.parseFloat(model.getThresholdValue());
|
||||||
|
iconMasking.setAlpha(maskingAlpha);
|
||||||
}
|
}
|
||||||
if (stringBuilders.size() == 0) {
|
if (stringBuilders.size() == 0) {
|
||||||
boxBlindHandler.postDelayed(boxBlindRunnable, 1500);
|
boxBlindHandler.postDelayed(boxBlindRunnable, 1500);
|
||||||
|
@ -11,12 +11,24 @@
|
|||||||
android:layout_height="86.5dp"
|
android:layout_height="86.5dp"
|
||||||
android:background="@mipmap/bg_kirin">
|
android:background="@mipmap/bg_kirin">
|
||||||
|
|
||||||
<com.opensource.svgaplayer.SVGAImageView
|
<RelativeLayout
|
||||||
android:id="@+id/blind_svga"
|
|
||||||
android:layout_width="29dp"
|
android:layout_width="29dp"
|
||||||
android:layout_height="29dp"
|
android:layout_height="29dp"
|
||||||
android:layout_marginStart="14dp"
|
android:layout_marginStart="14dp"
|
||||||
android:layout_marginTop="51dp" />
|
android:layout_marginTop="51dp">
|
||||||
|
|
||||||
|
<com.opensource.svgaplayer.SVGAImageView
|
||||||
|
android:id="@+id/blind_svga"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<com.yunbao.common.views.weight.ClipPathCircleImage
|
||||||
|
android:id="@+id/icon_masking"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:src="@mipmap/icon_masking" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
BIN
live/src/main/res/mipmap-xxxhdpi/icon_masking.png
Normal file
BIN
live/src/main/res/mipmap-xxxhdpi/icon_masking.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
Loading…
Reference in New Issue
Block a user