精灵夺宝:UI优化
This commit is contained in:
@@ -1123,10 +1123,7 @@
|
||||
android:name=".ui.webview.DialogWebViewActivity"
|
||||
android:theme="@style/dialog_web_view_activity"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity
|
||||
android:name=".ui.webview.FairyDialogWebViewActivity"
|
||||
android:theme="@style/dialog_web_view_activity"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.webview.DatingRuleWebViewActivity"
|
||||
android:theme="@style/dialog_web_view_activity" />
|
||||
@@ -1293,6 +1290,10 @@
|
||||
android:name=".treasurefairy.HomeFairyActivity"
|
||||
android:theme="@style/dialog_web_view_activity" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.webview.FairyDialogWebViewActivity"
|
||||
android:theme="@style/dialog_web_view_activity" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
Binary file not shown.
@@ -57,12 +57,14 @@ import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||
import com.mango.core.im.custom.bean.FairyMsgAttachment;
|
||||
import com.mango.core.im.custom.bean.RoomKitchenAttachment;
|
||||
import com.mango.core.im.custom.bean.WishListAttachment;
|
||||
import com.mango.core.room.anotherroompk.ShowUserInfoDialogEvent;
|
||||
import com.mango.core.room.wishlist.WishListModel;
|
||||
import com.mango.core.treasurefairy.FairyMsgInfo;
|
||||
import com.mango.core.utils.StringExtensionKt;
|
||||
import com.mango.moshen.treasure_box.widget.GoldBoxHelper;
|
||||
import com.mango.moshen.treasurefairy.HomeFairyActivity;
|
||||
import com.mango.moshen.utils.MsgBuilder;
|
||||
import com.mango.xchat_android_library.rxbus.RxBus;
|
||||
import com.netease.nim.uikit.business.uinfo.UserInfoHelper;
|
||||
import com.netease.nim.uikit.common.ui.span.RadiusBackgroundSpan;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
@@ -1051,13 +1053,12 @@ public class MessageView extends FrameLayout {
|
||||
builder.append(" 去参加!", new OriginalDrawStatusClickSpan(Color.parseColor("#FFBC51")) {
|
||||
@Override
|
||||
public void onClick(@NonNull View widget) {
|
||||
|
||||
HomeFairyActivity.start(mContext);
|
||||
}
|
||||
});
|
||||
tvContent.setOnClickListener(v -> HomeFairyActivity.start(mContext));
|
||||
} else {
|
||||
tvContent.setOnClickListener(null);
|
||||
}
|
||||
tvContent.setOnClickListener(null);
|
||||
tvContent.setMovementMethod(new LinkMovementMethod());
|
||||
tvContent.setText(builder.build());
|
||||
}
|
||||
}
|
||||
@@ -1067,7 +1068,13 @@ public class MessageView extends FrameLayout {
|
||||
private SpannableBuilder builderConvertMsg(TextView textView, @NonNull FairyMsgInfo fairyMsgInfo, String type) {
|
||||
return new SpannableBuilder(textView)
|
||||
.append("厉害了!", new ForegroundColorSpan(whiteColor))
|
||||
.append(StringExtensionKt.subAndReplaceDot(fairyMsgInfo.getNick(), 7), new ForegroundColorSpan(roomTipNickColor))
|
||||
.append(StringExtensionKt.subAndReplaceDot(fairyMsgInfo.getNick(), 7), new OriginalDrawStatusClickSpan(roomTipNickColor, false) {
|
||||
|
||||
@Override
|
||||
public void onClick(@NonNull View widget) {
|
||||
RxBus.get().post(new ShowUserInfoDialogEvent(String.valueOf(fairyMsgInfo.getUid())));
|
||||
}
|
||||
})
|
||||
.append("在夺宝精灵中 " + type, new ForegroundColorSpan(whiteColor))
|
||||
.append(fairyMsgInfo.getRewardShowValue() + "钻" + fairyMsgInfo.getRewardName(), new ForegroundColorSpan(roomTipColor));
|
||||
}
|
||||
@@ -1075,7 +1082,13 @@ public class MessageView extends FrameLayout {
|
||||
private SpannableBuilder builderDrawMsg(TextView textView, @NonNull FairyMsgInfo fairyMsgInfo, String desc) {
|
||||
SpannableBuilder builder = new SpannableBuilder(textView)
|
||||
.append(desc, new ForegroundColorSpan(whiteColor))
|
||||
.append(StringExtensionKt.subAndReplaceDot(fairyMsgInfo.getNick(), 7), new ForegroundColorSpan(roomTipNickColor))
|
||||
.append(StringExtensionKt.subAndReplaceDot(fairyMsgInfo.getNick(), 7), new OriginalDrawStatusClickSpan(roomTipNickColor, false) {
|
||||
|
||||
@Override
|
||||
public void onClick(@NonNull View widget) {
|
||||
RxBus.get().post(new ShowUserInfoDialogEvent(String.valueOf(fairyMsgInfo.getUid())));
|
||||
}
|
||||
})
|
||||
.append(" 在夺宝精灵中获得 ", new ForegroundColorSpan(whiteColor))
|
||||
.append(fairyMsgInfo.getRewardName(), new ForegroundColorSpan(Color.WHITE));
|
||||
if (fairyMsgInfo.getRewardNum() > 1) {
|
||||
|
@@ -2,12 +2,14 @@ package com.mango.moshen.common.widget;
|
||||
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import android.text.TextPaint;
|
||||
import android.text.style.ClickableSpan;
|
||||
|
||||
public abstract class OriginalDrawStatusClickSpan extends ClickableSpan {
|
||||
|
||||
private final Integer mColor;
|
||||
private final boolean underlineText;
|
||||
|
||||
public OriginalDrawStatusClickSpan() {
|
||||
this(null);
|
||||
@@ -15,13 +17,19 @@ public abstract class OriginalDrawStatusClickSpan extends ClickableSpan {
|
||||
|
||||
public OriginalDrawStatusClickSpan(@ColorInt Integer color) {
|
||||
this.mColor = color;
|
||||
this.underlineText = true;
|
||||
}
|
||||
|
||||
public OriginalDrawStatusClickSpan(@ColorInt Integer color, boolean underlineText) {
|
||||
this.mColor = color;
|
||||
this.underlineText = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDrawState(@NonNull TextPaint ds) {
|
||||
if (mColor != null) {
|
||||
ds.setColor(mColor);
|
||||
ds.setUnderlineText(true);
|
||||
ds.setUnderlineText(underlineText);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -187,7 +187,7 @@ class HomeFairyActivity : BaseViewBindingActivity<TreasureFairyDialogHomeBinding
|
||||
|
||||
private fun checkKeyNum(num: Int): Boolean {
|
||||
val keyNum = binding.tvKeyNum.text.toString().toInt()
|
||||
if (keyNum > num) {
|
||||
if (keyNum >= num) {
|
||||
return true
|
||||
}
|
||||
DialogManager(context).showOkCancelDialog("购买限时装扮活动夺宝券", "去参与", "取消") {
|
||||
|
@@ -7,6 +7,8 @@ import android.view.WindowManager
|
||||
import androidx.core.view.isInvisible
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.mango.core.utils.subAndReplaceDot
|
||||
import com.mango.core.utils.toIntOrDef
|
||||
import com.mango.core.utils.toast
|
||||
import com.mango.moshen.R
|
||||
import com.mango.moshen.base.BaseDialog
|
||||
import com.mango.moshen.databinding.TreasureFairyDialogForestBinding
|
||||
@@ -73,17 +75,21 @@ class ForestFairyDialog : BaseDialog<TreasureFairyDialogForestBinding>() {
|
||||
switchType()
|
||||
}
|
||||
binding.viewBgGrab1.setOnClickListener {
|
||||
enabledOpenBtn(false)
|
||||
binding.animView.startPlay(requireContext().assets, "vap/fairy_anim_once.mp4")
|
||||
binding.animView.postDelayed(showResultRunnable,1900)
|
||||
viewModel.drawForestFairy(1, currentType)
|
||||
if (checkBallNum(1)) {
|
||||
enabledOpenBtn(false)
|
||||
binding.animView.startPlay(requireContext().assets, "vap/fairy_anim_once.mp4")
|
||||
binding.animView.postDelayed(showResultRunnable, 1900)
|
||||
viewModel.drawForestFairy(1, currentType)
|
||||
}
|
||||
}
|
||||
|
||||
binding.viewBgGrab10.setOnClickListener {
|
||||
enabledOpenBtn(false)
|
||||
binding.animView.startPlay(requireContext().assets, "vap/fairy_anim_ten.mp4")
|
||||
binding.animView.postDelayed(showResultRunnable,1900)
|
||||
viewModel.drawForestFairy(10, currentType)
|
||||
if (checkBallNum(10)) {
|
||||
enabledOpenBtn(false)
|
||||
binding.animView.startPlay(requireContext().assets, "vap/fairy_anim_ten.mp4")
|
||||
binding.animView.postDelayed(showResultRunnable, 1900)
|
||||
viewModel.drawForestFairy(10, currentType)
|
||||
}
|
||||
}
|
||||
|
||||
binding.animView.setOnClickListener {
|
||||
@@ -99,7 +105,7 @@ class ForestFairyDialog : BaseDialog<TreasureFairyDialogForestBinding>() {
|
||||
if (resultNotShowed) {
|
||||
showResultRunnable.run()
|
||||
}
|
||||
}?:run{
|
||||
} ?: run {
|
||||
enabledOpenBtn(true)
|
||||
}
|
||||
}
|
||||
@@ -118,6 +124,22 @@ class ForestFairyDialog : BaseDialog<TreasureFairyDialogForestBinding>() {
|
||||
|
||||
}
|
||||
|
||||
private fun checkBallNum(openNum: Int): Boolean {
|
||||
val ballNum = viewModel.forestInfoLiveData.value?.let {
|
||||
when (currentType) {
|
||||
BASE -> it.lowBallNum.toIntOrDef(0)
|
||||
EPIC -> it.middleBallNum.toIntOrDef(0)
|
||||
else -> it.highBallNum.toIntOrDef(0)
|
||||
}
|
||||
} ?: 0
|
||||
return if (ballNum >= openNum) {
|
||||
true
|
||||
} else {
|
||||
"精灵球数量不足".toast()
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
private fun enabledOpenBtn(enable: Boolean) {
|
||||
binding.viewBgGrab1.isEnabled = enable
|
||||
binding.viewBgGrab10.isEnabled = enable
|
||||
|
@@ -6,6 +6,7 @@ import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import com.mango.core.DemoCache
|
||||
import com.mango.moshen.R
|
||||
import com.mango.moshen.avroom.adapter.RoomVPAdapter
|
||||
import com.mango.moshen.base.BaseDialog
|
||||
@@ -52,9 +53,9 @@ class MyFairyDialog : BaseDialog<TreasureFairyDialogMyFairyBinding>() {
|
||||
1 -> binding.rg.check(R.id.rb_epic)
|
||||
2 -> binding.rg.check(R.id.rb_legend)
|
||||
}
|
||||
DemoCache.saveMyFairyIndex(position)
|
||||
}
|
||||
})
|
||||
|
||||
binding.viewPager.adapter = RoomVPAdapter(
|
||||
childFragmentManager,
|
||||
listOf(
|
||||
@@ -63,6 +64,9 @@ class MyFairyDialog : BaseDialog<TreasureFairyDialogMyFairyBinding>() {
|
||||
MyFairyFragment.newInstance(MyFairyItemView.LEGEND)
|
||||
)
|
||||
)
|
||||
|
||||
binding.viewPager.setCurrentItem(DemoCache.readMyFairyIndex(), false)
|
||||
|
||||
viewModel.getMyFairyInfo()
|
||||
}
|
||||
|
||||
|
@@ -8,6 +8,7 @@ import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mango.core.treasurefairy.SendFairyInfo
|
||||
import com.mango.moshen.base.BaseDialog
|
||||
import com.mango.moshen.common.EmptyViewHelper
|
||||
import com.mango.moshen.databinding.TreasureFairyDialogMyFairyRecordBinding
|
||||
import com.mango.moshen.treasurefairy.FairyViewModel
|
||||
import com.mango.moshen.treasurefairy.adapter.MyFairyRecordAdapter
|
||||
@@ -40,6 +41,7 @@ class MyFairyRecordDialog : BaseDialog<TreasureFairyDialogMyFairyRecordBinding>(
|
||||
rvDelegate = RVDelegate.Builder<SendFairyInfo>()
|
||||
.setAdapter(recordAdapter)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setEmptyView(EmptyViewHelper.createEmptyTextView(context,"暂无记录"))
|
||||
.setLayoutManager(LinearLayoutManager(context))
|
||||
.build()
|
||||
|
||||
|
@@ -6,6 +6,7 @@ import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.mango.moshen.R;
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
@@ -22,8 +23,13 @@ public class FairyDialogWebViewActivity extends CommonWebViewActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, ScreenUtil.screenWidth * 1100 / 750);
|
||||
getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, ScreenUtil.screenHeight - ScreenUtil.getStatusBarHeight(this));
|
||||
getWindow().setGravity(Gravity.BOTTOM);
|
||||
View layoutRoot = findViewById(R.id.ll_root);
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) layoutRoot.getLayoutParams();
|
||||
layoutParams.height = ScreenUtil.screenWidth * 1100 / 750;
|
||||
layoutParams.width = FrameLayout.LayoutParams.MATCH_PARENT;
|
||||
layoutRoot.setLayoutParams(layoutParams);
|
||||
layoutTitleBar.setVisibility(View.GONE);
|
||||
webView.setBackgroundColor(0);
|
||||
webView.getBackground().setAlpha(0);
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
@@ -2,7 +2,11 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#00A69D" />
|
||||
<solid android:color="#007983" />
|
||||
|
||||
<corners android:radius="8dp" />
|
||||
|
||||
<stroke
|
||||
android:width="1px"
|
||||
android:color="#FFE8AA" />
|
||||
</shape>
|
@@ -6,8 +6,10 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/treasure_fairy_bg_elf"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
@@ -13,12 +13,12 @@
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50dp"
|
||||
tools:background="@color/black">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="60dp"
|
||||
android:background="@drawable/all_service_gift_level_one_background"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
@@ -157,7 +157,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginTop="62dp"
|
||||
android:layout_marginEnd="9dp"
|
||||
android:src="@drawable/ic_close_all_server_one" />
|
||||
|
||||
|
@@ -10,180 +10,186 @@
|
||||
type="com.mango.core.noble.AllServiceGiftProtocol.DataBean" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50dp"
|
||||
tools:background="@color/black">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svga_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:autoPlay="true"
|
||||
app:fillMode="Forward"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ll_root"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/ll_root"
|
||||
app:loopCount="1"
|
||||
app:source="svga/all_service.svga" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_root"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="750:195"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:background="@drawable/all_service_gift_level_three_background">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/benefactor_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/benefactor_avatar_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true">
|
||||
|
||||
<View
|
||||
android:id="@+id/benefactor_avatar_background"
|
||||
android:layout_width="47dp"
|
||||
android:layout_height="47dp"
|
||||
android:background="@drawable/shape_circle_three_service" />
|
||||
|
||||
<com.mango.moshen.common.widget.CircleImageView
|
||||
android:id="@+id/benefactor_avatar"
|
||||
avatarUrl="@{giftBean.sendUserAvatar}"
|
||||
android:layout_width="43dp"
|
||||
android:layout_height="43dp"
|
||||
android:layout_gravity="center"
|
||||
tools:src="@drawable/default_avatar" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/benefactor_nick"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_below="@id/benefactor_avatar_layout"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="-8dp"
|
||||
android:background="@drawable/all_service_gift_nick_three_background"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLength="6"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@{giftBean.sendUserNick}"
|
||||
android:textColor="#FF7200"
|
||||
android:textSize="10dp"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="宫泽艾里斯宫泽艾里斯-宫泽艾里斯" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/give_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:src="@drawable/all_service_gift_give_level_3" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/receiver_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/receiver_avatar_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true">
|
||||
|
||||
<View
|
||||
android:id="@+id/receiver_avatar_background"
|
||||
android:layout_width="47dp"
|
||||
android:layout_height="47dp"
|
||||
android:background="@drawable/shape_circle_three_service" />
|
||||
|
||||
<com.mango.moshen.common.widget.CircleImageView
|
||||
android:id="@+id/receiver_avatar"
|
||||
avatarUrl="@{giftBean.recvUserAvatar}"
|
||||
android:layout_width="43dp"
|
||||
android:layout_height="43dp"
|
||||
android:layout_gravity="center"
|
||||
tools:src="@drawable/default_avatar" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/receiver_nick"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_below="@id/receiver_avatar_layout"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="-8dp"
|
||||
android:background="@drawable/all_service_gift_nick_three_background"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLength="6"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@{giftBean.recvUserNick}"
|
||||
android:textColor="#FF7200"
|
||||
android:textSize="10dp"
|
||||
tools:text="梅利奥达斯-梅利奥达斯-梅利奥达斯" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gift_img"
|
||||
nomalUrl="@{giftBean.giftUrl}"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="@dimen/dp_20" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gift_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_11"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@{@string/x + giftBean.giftNum}"
|
||||
android:textColor="#FFFEF563"
|
||||
android:textSize="20dp"
|
||||
android:textStyle="italic|bold"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="x1314" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close_dialog_one"
|
||||
android:layout_width="wrap_content"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginEnd="9dp"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/ic_close_all_server_three"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_marginTop="60dp"
|
||||
tools:background="@color/black">
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svga_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:autoPlay="true"
|
||||
app:fillMode="Forward"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ll_root"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/ll_root"
|
||||
app:loopCount="1"
|
||||
app:source="svga/all_service.svga" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_root"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintDimensionRatio="750:195"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:background="@drawable/all_service_gift_level_three_background">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/benefactor_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/benefactor_avatar_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true">
|
||||
|
||||
<View
|
||||
android:id="@+id/benefactor_avatar_background"
|
||||
android:layout_width="47dp"
|
||||
android:layout_height="47dp"
|
||||
android:background="@drawable/shape_circle_three_service" />
|
||||
|
||||
<com.mango.moshen.common.widget.CircleImageView
|
||||
android:id="@+id/benefactor_avatar"
|
||||
avatarUrl="@{giftBean.sendUserAvatar}"
|
||||
android:layout_width="43dp"
|
||||
android:layout_height="43dp"
|
||||
android:layout_gravity="center"
|
||||
tools:src="@drawable/default_avatar" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/benefactor_nick"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_below="@id/benefactor_avatar_layout"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="-8dp"
|
||||
android:background="@drawable/all_service_gift_nick_three_background"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLength="6"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@{giftBean.sendUserNick}"
|
||||
android:textColor="#FF7200"
|
||||
android:textSize="10dp"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="宫泽艾里斯宫泽艾里斯-宫泽艾里斯" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/give_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:src="@drawable/all_service_gift_give_level_3" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/receiver_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/receiver_avatar_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true">
|
||||
|
||||
<View
|
||||
android:id="@+id/receiver_avatar_background"
|
||||
android:layout_width="47dp"
|
||||
android:layout_height="47dp"
|
||||
android:background="@drawable/shape_circle_three_service" />
|
||||
|
||||
<com.mango.moshen.common.widget.CircleImageView
|
||||
android:id="@+id/receiver_avatar"
|
||||
avatarUrl="@{giftBean.recvUserAvatar}"
|
||||
android:layout_width="43dp"
|
||||
android:layout_height="43dp"
|
||||
android:layout_gravity="center"
|
||||
tools:src="@drawable/default_avatar" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/receiver_nick"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_below="@id/receiver_avatar_layout"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="-8dp"
|
||||
android:background="@drawable/all_service_gift_nick_three_background"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLength="6"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="@{giftBean.recvUserNick}"
|
||||
android:textColor="#FF7200"
|
||||
android:textSize="10dp"
|
||||
tools:text="梅利奥达斯-梅利奥达斯-梅利奥达斯" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gift_img"
|
||||
nomalUrl="@{giftBean.giftUrl}"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="@dimen/dp_20" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gift_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_11"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@{@string/x + giftBean.giftNum}"
|
||||
android:textColor="#FFFEF563"
|
||||
android:textSize="20dp"
|
||||
android:textStyle="italic|bold"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="x1314" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close_dialog_one"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="62dp"
|
||||
android:layout_marginEnd="9dp"
|
||||
android:src="@drawable/ic_close_all_server_three"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</layout>
|
@@ -13,12 +13,12 @@
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50dp"
|
||||
tools:background="@color/black">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="60dp"
|
||||
android:background="@drawable/all_service_gift_level_two_background"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
@@ -157,7 +157,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginTop="62dp"
|
||||
android:layout_marginEnd="9dp"
|
||||
android:src="@drawable/ic_close_all_server_two" />
|
||||
|
||||
|
@@ -235,12 +235,13 @@
|
||||
android:id="@+id/tv_nickname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="用户昵称~"
|
||||
android:textColor="#ffffffff"
|
||||
android:layout_marginStart="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar" />
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar"
|
||||
tools:text="用户昵称~" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@@ -258,11 +258,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:textColor="#ff59fdff"
|
||||
android:textSize="12sp"
|
||||
android:textSize="10dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/fairy_item_9"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="达到 12300 后下次夺宝,额外获赠精灵球" />
|
||||
tools:text="幸运值达到X后,下次夺宝获赠精灵球" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_prize_click"
|
||||
|
@@ -26,7 +26,7 @@
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginEnd="50dp"
|
||||
android:gravity="center"
|
||||
android:text="收赠精灵记录"
|
||||
android:text="记录"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
|
@@ -51,7 +51,8 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:src="@drawable/treasure_fairy_ic_forest_next"
|
||||
android:rotation="180"
|
||||
android:src="@drawable/treasure_fairy_ic_exchange_next"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_gift"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_gift"
|
||||
@@ -63,8 +64,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:rotation="180"
|
||||
android:src="@drawable/treasure_fairy_ic_forest_next"
|
||||
android:src="@drawable/treasure_fairy_ic_exchange_next"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_gift"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_previous" />
|
||||
|
||||
|
@@ -33,7 +33,7 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="20dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -41,7 +41,7 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="20dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -135,12 +135,11 @@
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="13dp"
|
||||
android:layout_marginTop="26dp"
|
||||
android:layout_marginEnd="13dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_bottom" />
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_bottom"
|
||||
app:layout_constraintWidth_percent="0.95" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||
@@ -12,9 +12,14 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
android:background="@drawable/shape_006e7c_to_00b9af">
|
||||
android:id="@+id/fl_prize"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_006e7c_to_00b9af"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
@@ -38,6 +43,9 @@
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/fl_prize"
|
||||
tools:text="精灵球" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -11,7 +11,7 @@
|
||||
android:background="@drawable/treasure_fairy_bg_test_fairy_item_unselect"
|
||||
tools:layout_width="65dp">
|
||||
|
||||
<LinearLayout
|
||||
<View
|
||||
android:id="@+id/ll_root"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
@@ -22,41 +22,50 @@
|
||||
app:layout_constraintDimensionRatio="132:156"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_fairy_icon"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="4dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_cover" />
|
||||
<ImageView
|
||||
android:id="@+id/iv_fairy_icon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="3dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_cover"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.67" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fairy_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:text="精灵球"
|
||||
android:textColor="#1F5764"
|
||||
android:textSize="13sp" />
|
||||
<TextView
|
||||
android:id="@+id/tv_fairy_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:text="精灵球"
|
||||
android:textColor="#1F5764"
|
||||
android:textSize="13dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_fairy_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fairy_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
tools:text="1/5" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_fairy_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_fairy_name"
|
||||
tools:text="1/5" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
@@ -194,9 +194,9 @@
|
||||
<dimen name="dp_32">32dp</dimen>
|
||||
<dimen name="dp_6">6dp</dimen>
|
||||
|
||||
<dimen name="all_service_three_dialog_height">242dp</dimen>
|
||||
<dimen name="all_service_two_dialog_height">230dp</dimen>
|
||||
<dimen name="all_service_one_dialog_height">150dp</dimen>
|
||||
<dimen name="all_service_three_dialog_height">292dp</dimen>
|
||||
<dimen name="all_service_two_dialog_height">280dp</dimen>
|
||||
<dimen name="all_service_one_dialog_height">200dp</dimen>
|
||||
|
||||
<dimen name="dp_sign_in_total_reward_item_size">53dp</dimen>
|
||||
<dimen name="sp_21">21sp</dimen>
|
||||
|
@@ -65,6 +65,7 @@ public class DemoCache {
|
||||
private static final String KEY_SHOW_FAIRY_TIP = "key_show_fairy_tip";
|
||||
private static final String KEY_NEW_GIFT_TYPE_TIP = "key_new_gift_type_tip";
|
||||
private static final String KEY_NEW_GIFT_TYPE_TIP_INDICATOR = "key_new_gift_type_tip_indicator";
|
||||
private static final String KEY_MY_FAIRY_INDEX = "key_my_fairy_index";
|
||||
|
||||
private static StatusBarNotificationConfig notificationConfig;
|
||||
|
||||
@@ -393,4 +394,12 @@ public class DemoCache {
|
||||
return SettingsPref.instance().getBoolean(KEY_NEW_GIFT_TYPE_TIP_INDICATOR, true);
|
||||
}
|
||||
|
||||
public static void saveMyFairyIndex(int index) {
|
||||
SettingsPref.instance().putInt(KEY_MY_FAIRY_INDEX, index);
|
||||
}
|
||||
|
||||
public static int readMyFairyIndex() {
|
||||
return SettingsPref.instance().getInt(KEY_MY_FAIRY_INDEX, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user