魔法帽UI修改
This commit is contained in:
@@ -437,9 +437,9 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
val textView =
|
||||
LayoutInflater.from(mContext).inflate(R.layout.layout_room_box_notify, null) as TextView
|
||||
val text = SpannableBuilder()
|
||||
.append("厉害了! ", ForegroundColorSpan(Color.WHITE))
|
||||
.append("厉害了!", ForegroundColorSpan(Color.WHITE))
|
||||
.append(
|
||||
attachment.nick.sub(6) + " ",
|
||||
attachment.nick.sub(6),
|
||||
ForegroundColorSpan(resources.getColor(R.color.notice_nick))
|
||||
)
|
||||
.append("在魔法帽中获得", ForegroundColorSpan(Color.WHITE))
|
||||
@@ -485,9 +485,9 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
private fun showBoxNotifyBySVGA(chatRoomMessage: ChatRoomMessage) {
|
||||
val attachment = chatRoomMessage.attachment as RoomBoxPrizeAttachment
|
||||
val text = SpannableBuilder()
|
||||
.append("厉害了! ", ForegroundColorSpan(Color.WHITE))
|
||||
.append("厉害了!", ForegroundColorSpan(Color.WHITE))
|
||||
.append(
|
||||
attachment.nick + " ",
|
||||
attachment.nick.sub(6),
|
||||
ForegroundColorSpan(resources.getColor(R.color.notice_nick))
|
||||
)
|
||||
.append("在魔法帽中获得", ForegroundColorSpan(Color.WHITE))
|
||||
|
@@ -26,8 +26,8 @@ public class EmptyViewHelper {
|
||||
public static TextView createEmptyTextView(Context context,CharSequence text) {
|
||||
TextView textView = new TextView(context);
|
||||
textView.setGravity(Gravity.CENTER);
|
||||
textView.setTextColor(Color.WHITE);
|
||||
textView.setTextSize(12);
|
||||
textView.setTextColor(Color.parseColor("#dcc3ff"));
|
||||
textView.setTextSize(11);
|
||||
textView.setSingleLine(true);
|
||||
textView.setText(text);
|
||||
return textView;
|
||||
|
@@ -11,9 +11,9 @@
|
||||
android:maxLines="2"
|
||||
android:lineSpacingExtra="0dp"
|
||||
android:lineSpacingMultiplier="0.9"
|
||||
android:paddingStart="80dp"
|
||||
android:paddingEnd="80dp"
|
||||
android:paddingStart="45dp"
|
||||
android:paddingEnd="45dp"
|
||||
android:textSize="13sp"
|
||||
android:paddingTop="7dp"
|
||||
tools:layout_height="wrap_content"
|
||||
tools:text="哈哈哈哈哈哈啊哈哈啊哈哈哈哈哈哈哈哈哈哈哈" />
|
||||
tools:text="厉害了!用户名六个字 在魔法帽中获得礼物名字11" />
|
@@ -59,9 +59,9 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
@ActLayoutRes(R.layout.activity_treasure_box)
|
||||
public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBoxBinding> implements View.OnClickListener {
|
||||
private final Runnable removeRunnable = () -> mBinding.llPrizeHint.removeAllViews();
|
||||
private volatile int keyNum;
|
||||
private final ArrayList<PrizeInfo> hintPrizeCacheList = new ArrayList<>();
|
||||
private final int boxType = IBoxModel.BOX_TYPE_NORMAL;
|
||||
private volatile int keyNum;
|
||||
private int height;
|
||||
private int sendMessageSwitchLevel;
|
||||
|
||||
@@ -107,7 +107,7 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
mBinding.editNum.setSelection(3);
|
||||
SingleToastUtil.showToast("一次性最多只能摘200次");
|
||||
} else {
|
||||
mBinding.tvContinuousNum.setText("消耗" + num +"根魔法棒可连续变");
|
||||
mBinding.tvContinuousNum.setText("消耗" + num + "根魔法棒可连续变");
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -142,7 +142,7 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (mBinding.fragmentContainer.getVisibility() == View.VISIBLE) {
|
||||
mBinding.fragmentContainer.setVisibility(View.GONE);
|
||||
hideFragmentContainer();
|
||||
} else {
|
||||
super.onBackPressed();
|
||||
}
|
||||
@@ -153,7 +153,7 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
switch (v.getId()) {
|
||||
case R.id.root_view:
|
||||
if (mBinding.fragmentContainer.getVisibility() == View.VISIBLE) {
|
||||
mBinding.fragmentContainer.setVisibility(View.GONE);
|
||||
hideFragmentContainer();
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
@@ -181,7 +181,7 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
DialogWebViewActivity.start(this, UriProvider.getBoxKey());
|
||||
break;
|
||||
case R.id.tv_get_key:
|
||||
mBinding.fragmentContainer.setVisibility(View.GONE);
|
||||
hideFragmentContainer();
|
||||
DialogWebViewActivity.start(this, UriProvider.getBoxKey());
|
||||
break;
|
||||
case R.id.tv_box_rule:
|
||||
@@ -200,6 +200,14 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
.replace(R.id.fragment_container, fragment)
|
||||
.commitNow();
|
||||
mBinding.fragmentContainer.setVisibility(View.VISIBLE);
|
||||
mBinding.ivMore.setVisibility(View.INVISIBLE);
|
||||
mBinding.bgKeyNum.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
private void hideFragmentContainer() {
|
||||
mBinding.fragmentContainer.setVisibility(View.GONE);
|
||||
mBinding.ivMore.setVisibility(View.VISIBLE);
|
||||
mBinding.bgKeyNum.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -233,13 +241,13 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
BoxModel.get().openBox(boxType, count, sendMessage)
|
||||
.compose(bindToLifecycle())
|
||||
.doOnError(throwable -> {
|
||||
// mBinding.ivOpen.setEnabled(true);
|
||||
// mBinding.ivOpen.setEnabled(true);
|
||||
SingleToastUtil.showToast(throwable.getMessage());
|
||||
})
|
||||
.toObservable()
|
||||
//.delay(startTime - System.currentTimeMillis() + 300, TimeUnit.MILLISECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.doOnNext(openBoxResult ->{
|
||||
.doOnNext(openBoxResult -> {
|
||||
//mBinding.ivOpen.setEnabled(true);
|
||||
changeKeyNum(openBoxResult.getRemainKeyNum());
|
||||
mBinding.svgaGiftBg.startAnimation();
|
||||
|
Reference in New Issue
Block a user