糖果树UI升级
@@ -814,13 +814,11 @@
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".treasure_box.activity.TreasureBoxActivity"
|
||||
android:theme="@style/dialog_web_view_activity" />
|
||||
<activity
|
||||
android:name=".treasure_box.activity.BoxRankingActivity"
|
||||
android:theme="@style/room_message_activity" />
|
||||
android:theme="@style/treasure_box_activity" />
|
||||
|
||||
<activity
|
||||
android:name=".treasure_box.activity.TreasureBoxHonourActivity"
|
||||
android:theme="@style/dialog_web_view_activity" />
|
||||
android:theme="@style/treasure_box_activity" />
|
||||
|
||||
<activity android:name=".ui.setting.VerifyPhoneActivity" />
|
||||
<activity android:name=".ui.setting.ModifyPwdActivity" />
|
||||
|
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:color="@color/white" android:state_checked="true" />
|
||||
|
||||
<item android:color="#8542E8" />
|
||||
|
||||
</selector>
|
8
app/src/main/res/drawable/shape_b34a189f_corner_20dp.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#B34A189F" />
|
||||
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
@@ -1,59 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
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="@drawable/bg_common_touch_while"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_height="44dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
>
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="0.3"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0.3"
|
||||
android:paddingStart="@dimen/dp_8"
|
||||
>
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_position"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_position"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_13"
|
||||
android:textColor="@color/color_666666"
|
||||
android:layout_gravity="center_vertical"
|
||||
tools:text="100"
|
||||
android:gravity="center"
|
||||
/>
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/dp_13"
|
||||
tools:text="100" />
|
||||
</FrameLayout>
|
||||
|
||||
<com.mango.moshen.ui.widget.NobleAvatarView
|
||||
android:id="@+id/noble_avatar_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
<com.mango.moshen.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="27dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/default_avatar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_userName"
|
||||
@@ -61,37 +59,33 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="15sp"
|
||||
tools:text="我的我的我的我的我的我的"
|
||||
android:textColor="#F8CBFF"
|
||||
android:textSize="10sp"
|
||||
app:layout_flexShrink="1"
|
||||
/>
|
||||
tools:text="我的我的我的我的我的我的" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_amount"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.7"
|
||||
tools:text="1236843"
|
||||
android:gravity="end"
|
||||
android:textColor="#1093F5"
|
||||
android:textSize="@dimen/dp_15"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:drawableEnd="@drawable/treasure_box_diamond"
|
||||
android:drawablePadding="5dp"
|
||||
/>
|
||||
android:gravity="end"
|
||||
android:textColor="#FFD67E"
|
||||
android:textSize="10sp"
|
||||
tools:text="1236843" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line"
|
||||
android:background="@color/color_F4F4F4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="90dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
android:background="@color/color_F4F4F4"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
@@ -1,21 +1,17 @@
|
||||
<com.mango.moshen.common.widget.StatusLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.mango.moshen.home.fragment.HomeOtherTabFragment">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:paddingTop="2dp"
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
android:paddingTop="2dp" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
|
@@ -182,6 +182,12 @@
|
||||
<item name="android:windowEnterAnimation">@anim/anim_bottom_in</item>
|
||||
|
||||
<item name="android:windowExitAnimation">@anim/anim_bottom_out</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="treasure_box_activity" parent="dialog_web_view_activity">
|
||||
<!--背景是否模糊显示-->
|
||||
<item name="android:backgroundDimEnabled">false</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
@@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:background="@color/color_666666">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="360dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/shape_white_top_14dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<com.flyco.tablayout.SlidingTabLayout
|
||||
android:id="@+id/view_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:background="@drawable/shape_white_top_14dp"
|
||||
app:tl_indicator_color="@color/appColor"
|
||||
app:tl_indicator_corner_radius="2dp"
|
||||
app:tl_indicator_height="@dimen/dp_3"
|
||||
app:tl_indicator_width="@dimen/dp_9"
|
||||
app:tl_tab_space_equal="true"
|
||||
app:tl_textSelectColor="@color/color_333333"
|
||||
app:tl_textUnselectColor="@color/text_tertiary"
|
||||
app:tl_textsize="@dimen/dp_16" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_refresh"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/refresh"
|
||||
android:layout_gravity="end"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/color_f5f5f5" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
@@ -4,53 +4,34 @@ import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioGroup;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.flyco.tablayout.SlidingTabLayout;
|
||||
import com.mango.moshen.R;
|
||||
import com.mango.moshen.base.BaseActivity;
|
||||
import com.mango.moshen.common.ViewPagerAdapter;
|
||||
import com.mango.moshen.decoration.view.widgets.CarMagicIndicator;
|
||||
import com.mango.core.room.treasure_box.event.RefreshBoxRankingEvent;
|
||||
import com.mango.moshen.treasure_box.fragment.BoxRankingFragment;
|
||||
import com.mango.moshen.room_chat.event.ClickRootViewEvent;
|
||||
import com.mango.core.home.bean.TabInfo;
|
||||
import com.mango.core.manager.IMNetEaseManager;
|
||||
import com.mango.core.manager.RoomEvent;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
import com.mango.moshen.R;
|
||||
import com.mango.moshen.base.BaseViewBindingFragment;
|
||||
import com.mango.moshen.common.ViewPagerAdapter;
|
||||
import com.mango.moshen.databinding.ActivityRoomBoxRankingBinding;
|
||||
import com.mango.moshen.decoration.view.widgets.CarMagicIndicator;
|
||||
import com.mango.moshen.treasure_box.fragment.BoxRankingFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
|
||||
public class BoxRankingActivity extends BaseViewBindingFragment<ActivityRoomBoxRankingBinding> {
|
||||
|
||||
|
||||
public class BoxRankingActivity extends BaseActivity implements CarMagicIndicator.OnItemSelectListener {
|
||||
|
||||
@BindView(R.id.view_indicator)
|
||||
SlidingTabLayout viewIndicator;
|
||||
@BindView(R.id.viewpager)
|
||||
ViewPager viewpager;
|
||||
@BindView(R.id.iv_refresh)
|
||||
ImageView ivRefresh;
|
||||
private String[] titles = {"今日榜单", "昨日榜单"};
|
||||
public static final int TYPE_TODAY = 1;//今日
|
||||
public static final int TYPE_YESTERDAY = 2;//今日
|
||||
private String[] titles = {"今日榜单", "昨日榜单"};
|
||||
|
||||
|
||||
public static void start(Context context) {
|
||||
Intent starter = new Intent(context, BoxRankingActivity.class);
|
||||
//starter.putExtra();
|
||||
context.startActivity(starter);
|
||||
public static BoxRankingActivity newInstance() {
|
||||
Bundle args = new Bundle();
|
||||
BoxRankingActivity fragment = new BoxRankingActivity();
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
@@ -59,36 +40,24 @@ public class BoxRankingActivity extends BaseActivity implements CarMagicIndicato
|
||||
for (int i = 0; i < titles.length; i++) {
|
||||
tabInfoList.add(new TabInfo(i, titles[i]));
|
||||
}
|
||||
viewpager.setOffscreenPageLimit(2);
|
||||
viewpager.setAdapter(new ViewPagerAdapter(getSupportFragmentManager(), getFragment(), titles));
|
||||
viewIndicator.setViewPager(viewpager, titles, this, getFragment());
|
||||
|
||||
IMNetEaseManager.get().getChatRoomEventObservable()
|
||||
.compose(bindToLifecycle())
|
||||
.filter(roomEvent -> roomEvent.getEvent() == RoomEvent.KICK_OUT_ROOM)
|
||||
.subscribe(roomEvent -> finish());
|
||||
|
||||
ivRefresh.setOnClickListener(v -> EventBus.getDefault().post(new RefreshBoxRankingEvent()));
|
||||
getBinding().viewpager.setOffscreenPageLimit(2);
|
||||
getBinding().viewpager.setAdapter(new ViewPagerAdapter(getChildFragmentManager(), getFragment(), titles));
|
||||
getBinding().viewpager.addOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
if (position == 0) {
|
||||
getBinding().rbToday.setChecked(true);
|
||||
} else {
|
||||
getBinding().rbYesterday.setChecked(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
getBinding().rg.setOnCheckedChangeListener((group, checkedId) -> getBinding().viewpager.setCurrentItem(checkedId == R.id.rb_today ? 0 : 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean needSteepStateBar() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_room_box_ranking);
|
||||
ButterKnife.bind(this);
|
||||
EventBus.getDefault().register(this);
|
||||
init();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
public int getRootLayoutId() {
|
||||
return R.layout.activity_room_box_ranking;
|
||||
}
|
||||
|
||||
private ArrayList<Fragment> getFragment() {
|
||||
@@ -97,19 +66,4 @@ public class BoxRankingActivity extends BaseActivity implements CarMagicIndicato
|
||||
list.add(BoxRankingFragment.newInstance(TYPE_YESTERDAY));
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemSelect(int position) {
|
||||
viewpager.setCurrentItem(position);
|
||||
}
|
||||
|
||||
@OnClick(R.id.root_view)
|
||||
public void onViewClicked() {
|
||||
finish();
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onRootViewClicked(ClickRootViewEvent event) {
|
||||
onViewClicked();
|
||||
}
|
||||
}
|
@@ -18,8 +18,14 @@ import android.view.animation.AccelerateDecelerateInterpolator;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.mango.core.room.treasure_box.event.RefreshBoxRankingEvent;
|
||||
import com.mango.core.statistic.StatisticManager;
|
||||
import com.mango.core.statistic.protocol.StatisticsProtocol;
|
||||
import com.mango.moshen.treasure_box.fragment.BoxRecordFragment;
|
||||
import com.mango.moshen.treasure_box.fragment.BoxRuleFragment;
|
||||
import com.mango.treasure_box.event.MoreClickEvent;
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
import com.mango.moshen.R;
|
||||
@@ -44,6 +50,10 @@ import com.mango.xchat_android_library.utils.FormatUtils;
|
||||
import com.mango.xchat_android_library.utils.SingleToastUtil;
|
||||
import com.mango.xchat_android_library.utils.TextWatcherWrapper;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -72,6 +82,7 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
EventBus.getDefault().register(this);
|
||||
//这里的height用MATCH_PARENT状态栏会被顶上去,不知道什么鬼
|
||||
height = ScreenUtil.screenHeight - ScreenUtil.getStatusBarHeight(context);
|
||||
getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, height);
|
||||
@@ -83,6 +94,12 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.EVENT_ROOM_POP_CLICK, "房间pop点击", arguments);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
mBinding.setClick(this);
|
||||
@@ -140,18 +157,35 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
});
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onMoreClickEvent(MoreClickEvent event) {
|
||||
onClick(event.getView());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (mBinding.fragmentContainer.getVisibility() == View.VISIBLE) {
|
||||
mBinding.fragmentContainer.setVisibility(View.GONE);
|
||||
} else {
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.root_view:
|
||||
finish();
|
||||
if (mBinding.fragmentContainer.getVisibility() == View.VISIBLE) {
|
||||
mBinding.fragmentContainer.setVisibility(View.GONE);
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
break;
|
||||
case R.id.iv_more:
|
||||
new BoxMoreDialog(context, sendMessageSwitchLevel).openDialog();
|
||||
replaceFragment(BoxMoreDialog.newInstance(sendMessageSwitchLevel));
|
||||
break;
|
||||
case R.id.tv_rank:
|
||||
// DialogWebViewActivity.start(context, UriProvider.getBoxRank(), false);
|
||||
BoxRankingActivity.start(this);
|
||||
replaceFragment(BoxRankingActivity.newInstance());
|
||||
break;
|
||||
case R.id.iv_open:
|
||||
openBox(StringUtils.toInt(mBinding.editNum.getText().toString(), 0));
|
||||
@@ -169,11 +203,28 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
case R.id.ll_get_key:
|
||||
DialogWebViewActivity.start(this, UriProvider.getBoxKey());
|
||||
break;
|
||||
case R.id.tv_get_key:
|
||||
mBinding.fragmentContainer.setVisibility(View.GONE);
|
||||
DialogWebViewActivity.start(this, UriProvider.getBoxKey());
|
||||
break;
|
||||
case R.id.tv_box_rule:
|
||||
replaceFragment(BoxRuleFragment.Companion.newInstance());
|
||||
break;
|
||||
case R.id.tv_history:
|
||||
replaceFragment(BoxRecordFragment.Companion.newInstance());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void replaceFragment(Fragment fragment) {
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.fragment_container, fragment)
|
||||
.commitNow();
|
||||
mBinding.fragmentContainer.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查钥匙(锤子)数量
|
||||
*
|
||||
@@ -265,13 +316,13 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
switch (prizeInfo.getPrizeLevel()) {
|
||||
case 3:
|
||||
default:
|
||||
linearLayout.setBackgroundResource(R.drawable.bg_box_prize_hint_v3);
|
||||
linearLayout.setBackgroundResource(R.drawable.bg_box_prize_hint_l3);
|
||||
break;
|
||||
case 4:
|
||||
linearLayout.setBackgroundResource(R.drawable.bg_box_prize_hint_v4);
|
||||
linearLayout.setBackgroundResource(R.drawable.bg_box_prize_hint_l4);
|
||||
break;
|
||||
case 5:
|
||||
linearLayout.setBackgroundResource(R.drawable.bg_box_prize_hint_v5);
|
||||
linearLayout.setBackgroundResource(R.drawable.bg_box_prize_hint_l5);
|
||||
break;
|
||||
}
|
||||
linearLayout.setPadding(ScreenUtil.dip2px(10), 0, ScreenUtil.dip2px(10), 0);
|
||||
|
@@ -23,7 +23,6 @@ import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
import com.mango.moshen.R;
|
||||
import com.mango.moshen.base.BaseBindingActivity;
|
||||
import com.mango.moshen.databinding.ActivityTreasureBoxHonourBinding;
|
||||
import com.mango.moshen.treasure_box.widget.dialog.BoxMoreDialog;
|
||||
import com.mango.moshen.ui.utils.ImageLoadUtils;
|
||||
import com.mango.moshen.ui.webview.DialogWebViewActivity;
|
||||
import com.mango.treasure_box.bean.PrizeInfo;
|
||||
@@ -136,10 +135,10 @@ public class TreasureBoxHonourActivity extends BaseBindingActivity<ActivityTreas
|
||||
openBox(StringUtils.toInt(mBinding.editNum.getText().toString()));
|
||||
break;
|
||||
case R.id.iv_more:
|
||||
new BoxMoreDialog(context, sendMessageSwitchLevel).openDialog();
|
||||
//new BoxMoreDialog(context, sendMessageSwitchLevel).openDialog();
|
||||
break;
|
||||
case R.id.tv_rank:
|
||||
BoxRankingActivity.start(this);
|
||||
//BoxRankingActivity.start(this);
|
||||
break;
|
||||
case R.id.iv_sub:
|
||||
mBinding.editNum.setText(String.valueOf(Math.max(StringUtils.toInt(mBinding.editNum.getText().toString(), 0) - 1, 1)));
|
||||
|
@@ -112,7 +112,7 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
||||
swipeRefresh.setRefreshing(false);
|
||||
|
||||
if (rankingInfo.getRankVos() == null || rankingInfo.getRankVos().size() == 0) {
|
||||
showNoData(getString(R.string.empty_newbie_list));
|
||||
showNoData(getString(R.string.tips_radish_record_empty));
|
||||
} else {
|
||||
mAdapter.setNewData(rankingInfo.getRankVos());
|
||||
}
|
||||
@@ -126,7 +126,7 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
||||
|
||||
int page = getMvpPresenter().getPage();
|
||||
if (page <= 1) {
|
||||
showNoData(getString(R.string.empty_newbie_list));
|
||||
showNoData(getString(R.string.tips_radish_record_empty));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
||||
hideStatus();
|
||||
int page = getMvpPresenter().getPage();
|
||||
if (page <= 1) {
|
||||
showNoData(getString(R.string.empty_newbie_list));
|
||||
showNoData(getString(R.string.tips_radish_record_empty));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,87 @@
|
||||
package com.mango.moshen.treasure_box.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.widget.ImageView
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.mango.core.auth.AuthModel
|
||||
import com.mango.moshen.R
|
||||
import com.mango.moshen.base.BaseViewBindingFragment
|
||||
import com.mango.moshen.common.EmptyViewHelper
|
||||
import com.mango.moshen.databinding.FragmentBoxRecordBinding
|
||||
import com.mango.moshen.ui.utils.RVDelegate
|
||||
import com.mango.moshen.ui.utils.load
|
||||
import com.mango.treasure_box.bean.PrizeInfo
|
||||
import com.mango.treasure_box.model.BoxModel
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
class BoxRecordFragment : BaseViewBindingFragment<FragmentBoxRecordBinding>() {
|
||||
|
||||
companion object {
|
||||
fun newInstance(): BoxRecordFragment {
|
||||
val args = Bundle()
|
||||
val fragment = BoxRecordFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private lateinit var adapter: BaseQuickAdapter<PrizeInfo, BaseViewHolder>
|
||||
private var page = 1
|
||||
private lateinit var rvDelegate: RVDelegate<PrizeInfo>
|
||||
private val pageSize = 20
|
||||
private val format = SimpleDateFormat("MM-dd HH:mm", Locale.CHINA)
|
||||
|
||||
override fun init() {
|
||||
adapter =
|
||||
object : BaseQuickAdapter<PrizeInfo, BaseViewHolder>(R.layout.item_box_prize_record) {
|
||||
override fun convert(helper: BaseViewHolder, item: PrizeInfo) {
|
||||
helper.getView<ImageView>(R.id.iv_prize_pic).load(item.prizeImgUrl)
|
||||
helper.setText(R.id.tv_prize_name, item.prizeName)
|
||||
.setText(R.id.tv_prize_num, "x${item.prizeNum}")
|
||||
.setText(R.id.tv_prize_time, format.format(item.createTime))
|
||||
}
|
||||
}
|
||||
|
||||
rvDelegate = RVDelegate.Builder<PrizeInfo>()
|
||||
.setAdapter(adapter)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setEmptyView(EmptyViewHelper.createEmptyView(context, "暂无记录"))
|
||||
.setLayoutManager(LinearLayoutManager(mContext))
|
||||
.setRefreshLayout(binding.swipeRefresh)
|
||||
.setPageSize(pageSize)
|
||||
.build()
|
||||
|
||||
adapter.setOnLoadMoreListener({ loadData(false) }, binding.recyclerView)
|
||||
|
||||
binding.swipeRefresh.setOnRefreshListener {
|
||||
loadData(true)
|
||||
}
|
||||
loadData(true)
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private fun loadData(isRefresh: Boolean) {
|
||||
binding.swipeRefresh.isRefreshing = isRefresh
|
||||
|
||||
if (isRefresh) {
|
||||
page = 1
|
||||
} else {
|
||||
page++
|
||||
}
|
||||
|
||||
BoxModel.get()
|
||||
.getPrizeRecord(page, pageSize, "time", AuthModel.get().currentUid)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe({
|
||||
rvDelegate.loadData(it, isRefresh)
|
||||
}, {
|
||||
it.printStackTrace()
|
||||
})
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,88 @@
|
||||
package com.mango.moshen.treasure_box.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.widget.ImageView
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.mango.core.auth.AuthModel
|
||||
import com.mango.moshen.R
|
||||
import com.mango.moshen.base.BaseViewBindingFragment
|
||||
import com.mango.moshen.common.EmptyViewHelper
|
||||
import com.mango.moshen.databinding.FragmentBoxRecordBinding
|
||||
import com.mango.moshen.databinding.FragmentBoxRuleBinding
|
||||
import com.mango.moshen.ui.utils.RVDelegate
|
||||
import com.mango.moshen.ui.utils.load
|
||||
import com.mango.treasure_box.bean.PrizeInfo
|
||||
import com.mango.treasure_box.model.BoxModel
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
class BoxRuleFragment : BaseViewBindingFragment<FragmentBoxRuleBinding>() {
|
||||
|
||||
companion object {
|
||||
fun newInstance(): BoxRuleFragment {
|
||||
val args = Bundle()
|
||||
val fragment = BoxRuleFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private lateinit var adapter: BaseQuickAdapter<PrizeInfo, BaseViewHolder>
|
||||
private var page = 1
|
||||
private lateinit var rvDelegate: RVDelegate<PrizeInfo>
|
||||
private val pageSize = 20
|
||||
private val format = SimpleDateFormat("MM-dd HH:mm", Locale.CHINA)
|
||||
|
||||
override fun init() {
|
||||
adapter =
|
||||
object : BaseQuickAdapter<PrizeInfo, BaseViewHolder>(R.layout.item_box_prize_record) {
|
||||
override fun convert(helper: BaseViewHolder, item: PrizeInfo) {
|
||||
helper.getView<ImageView>(R.id.iv_prize_pic).load(item.prizeImgUrl)
|
||||
helper.setText(R.id.tv_prize_name, item.prizeName)
|
||||
.setText(R.id.tv_prize_num, "x${item.prizeNum}")
|
||||
.setText(R.id.tv_prize_time, format.format(item.createTime))
|
||||
}
|
||||
}
|
||||
|
||||
rvDelegate = RVDelegate.Builder<PrizeInfo>()
|
||||
.setAdapter(adapter)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setEmptyView(EmptyViewHelper.createEmptyView(context, "暂无记录"))
|
||||
.setLayoutManager(LinearLayoutManager(mContext))
|
||||
.setRefreshLayout(binding.swipeRefresh)
|
||||
.setPageSize(pageSize)
|
||||
.build()
|
||||
|
||||
adapter.setOnLoadMoreListener({ loadData(false) }, binding.recyclerView)
|
||||
|
||||
binding.swipeRefresh.setOnRefreshListener {
|
||||
loadData(true)
|
||||
}
|
||||
loadData(true)
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private fun loadData(isRefresh: Boolean) {
|
||||
binding.swipeRefresh.isRefreshing = isRefresh
|
||||
|
||||
if (isRefresh) {
|
||||
page = 1
|
||||
} else {
|
||||
page++
|
||||
}
|
||||
|
||||
BoxModel.get()
|
||||
.getPrizeRecord(page, pageSize, "time", AuthModel.get().currentUid)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe({
|
||||
rvDelegate.loadData(it, isRefresh)
|
||||
}, {
|
||||
it.printStackTrace()
|
||||
})
|
||||
}
|
||||
|
||||
}
|
@@ -1,61 +1,56 @@
|
||||
package com.mango.moshen.treasure_box.widget.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.Gravity;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.mango.core.DemoCache;
|
||||
import com.mango.core.UriProvider;
|
||||
import com.mango.moshen.R;
|
||||
import com.mango.moshen.base.BaseViewBindingFragment;
|
||||
import com.mango.moshen.databinding.DialogBoxMoreBinding;
|
||||
import com.mango.moshen.ui.webview.DialogWebViewActivity;
|
||||
import com.mango.moshen.utils.UserUtils;
|
||||
import com.mango.core.DemoCache;
|
||||
import com.mango.core.UriProvider;
|
||||
import com.mango.treasure_box.event.MoreClickEvent;
|
||||
import com.mango.xchat_android_library.annatation.ActLayoutRes;
|
||||
import com.mango.xchat_android_library.utils.SingleToastUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
@ActLayoutRes(R.layout.dialog_box_more)
|
||||
public class BoxMoreDialog extends BaseBindingDialog<DialogBoxMoreBinding> {
|
||||
public class BoxMoreDialog extends BaseViewBindingFragment<DialogBoxMoreBinding> {
|
||||
|
||||
private int sendMessageSwitchLevel;
|
||||
|
||||
public BoxMoreDialog(Context context, int sendMessageSwitchLevel) {
|
||||
super(context);
|
||||
width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
this.sendMessageSwitchLevel = sendMessageSwitchLevel;
|
||||
|
||||
public static BoxMoreDialog newInstance(int sendMessageSwitchLevel) {
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("sendMessageSwitchLevel",sendMessageSwitchLevel);
|
||||
BoxMoreDialog fragment = new BoxMoreDialog();
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
Window window = getWindow();
|
||||
if (window != null) {
|
||||
WindowManager.LayoutParams windowParams = window.getAttributes();
|
||||
windowParams.gravity = Gravity.BOTTOM;
|
||||
window.setAttributes(windowParams);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
binding.tvHistory.setOnClickListener(v -> {
|
||||
DialogWebViewActivity.start(context, UriProvider.getBoxHistory(), false);
|
||||
closeDialog();
|
||||
public void init() {
|
||||
sendMessageSwitchLevel = requireArguments().getInt("sendMessageSwitchLevel");
|
||||
getBinding().tvHistory.setOnClickListener(v -> {
|
||||
EventBus.getDefault().post(new MoreClickEvent(v));
|
||||
//DialogWebViewActivity.start(mContext, UriProvider.getBoxHistory(), false);
|
||||
});
|
||||
binding.tvBoxRule.setOnClickListener(v -> {
|
||||
DialogWebViewActivity.start(context, UriProvider.getBoxHelp(), false);
|
||||
closeDialog();
|
||||
getBinding().tvBoxRule.setOnClickListener(v -> {
|
||||
EventBus.getDefault().post(new MoreClickEvent(v));
|
||||
//DialogWebViewActivity.start(mContext, UriProvider.getBoxHelp(), false);
|
||||
});
|
||||
binding.tvGetKey.setOnClickListener(v -> {
|
||||
DialogWebViewActivity.start(context, UriProvider.getBoxKey());
|
||||
closeDialog();
|
||||
getBinding().tvGetKey.setOnClickListener(v -> {
|
||||
EventBus.getDefault().post(new MoreClickEvent(v));
|
||||
//DialogWebViewActivity.start(mContext, UriProvider.getBoxKey());
|
||||
});
|
||||
|
||||
boolean canSwitch = sendMessageSwitchLevel != 0 && UserUtils.getExpLevel() >= sendMessageSwitchLevel;
|
||||
|
||||
updateMsgSwitch(canSwitch && DemoCache.readNeedBoxMsg());
|
||||
binding.ivSwitch.setOnClickListener(v -> {
|
||||
getBinding().ivSwitch.setOnClickListener(v -> {
|
||||
if (canSwitch) {
|
||||
boolean sendMsg = !DemoCache.readNeedBoxMsg();
|
||||
updateMsgSwitch(sendMsg);
|
||||
@@ -68,7 +63,7 @@ public class BoxMoreDialog extends BaseBindingDialog<DialogBoxMoreBinding> {
|
||||
}
|
||||
|
||||
private void updateMsgSwitch(boolean sendMsg) {
|
||||
binding.ivSwitch.setImageResource(sendMsg ?
|
||||
getBinding().ivSwitch.setImageResource(sendMsg ?
|
||||
R.drawable.icon_room_set_lock_true : R.drawable.icon_room_set_lock_false);
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 206 KiB |
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 185 KiB |
Before Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#ff62d3fd" />
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="19dp"
|
||||
android:topLeftRadius="0dp"
|
||||
android:topRightRadius="19dp" />
|
||||
</shape>
|
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#C97CFF" />
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="19dp"
|
||||
android:topLeftRadius="0dp"
|
||||
android:topRightRadius="19dp" />
|
||||
</shape>
|
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#FDBF69" />
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="19dp"
|
||||
android:topLeftRadius="0dp"
|
||||
android:topRightRadius="19dp" />
|
||||
</shape>
|
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#ff803eda" />
|
||||
<corners
|
||||
android:bottomLeftRadius="15dp"
|
||||
android:bottomRightRadius="15dp"
|
||||
android:topLeftRadius="15dp"
|
||||
android:topRightRadius="15dp" />
|
||||
</shape>
|
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/icon_box_rank_rb_true" android:state_checked="true" />
|
||||
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/transparent" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</selector>
|
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:background="@color/color_666666">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="199dp"
|
||||
android:layout_height="287dp"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/shape_b34a189f_corner_20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_today"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selector_treasure_box_rank_rb"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:text="今日榜单"
|
||||
android:textColor="@color/color_selector_white_false_8542e8"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_yesterday"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selector_treasure_box_rank_rb"
|
||||
android:button="@null"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:text="昨日榜单"
|
||||
android:textColor="@color/color_selector_white_false_8542e8"
|
||||
android:textSize="9sp" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
@@ -18,8 +18,8 @@
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="285dp"
|
||||
android:layout_height="416dp"
|
||||
android:layout_width="214dp"
|
||||
android:layout_height="337dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/treasure_box_bg_normal"
|
||||
android:onClick="@{click}"
|
||||
@@ -29,43 +29,30 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_title"
|
||||
android:id="@+id/iv_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="46dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/treasure_box_title_normal"
|
||||
app:layout_constraintBottom_toTopOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:src="@drawable/icon_room_box_more_normal"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_rank"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:drawableStart="@drawable/treasure_box_rank"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:text="排行榜"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
app:layout_constraintStart_toStartOf="@id/iv_more"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_more" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="35dp"
|
||||
android:layout_marginEnd="18dp"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/icon_room_box_more_normal"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_diamond_num"
|
||||
@@ -86,15 +73,27 @@
|
||||
android:id="@+id/tv_key_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:drawableTop="@drawable/treasure_box_meteor"
|
||||
android:layout_marginStart="9dp"
|
||||
android:background="@drawable/shape_white_alpha_20_radius_100"
|
||||
android:gravity="center"
|
||||
android:paddingStart="11dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_more"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_more"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_diamond_num"
|
||||
tools:text="200" />
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/bg_key_num"
|
||||
app:layout_constraintStart_toStartOf="@id/bg_key_num"
|
||||
app:layout_constraintTop_toTopOf="@id/bg_key_num"
|
||||
tools:text="99999999" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bg_key_num"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="47dp"
|
||||
android:src="@drawable/treasure_box_meteor"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_first_box"
|
||||
@@ -109,29 +108,30 @@
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/iv_box"
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="242dp"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="190dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="52dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:onClick="@{click}"
|
||||
app:autoPlay="true"
|
||||
app:layout_constraintBottom_toTopOf="@id/iv_sub"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
app:loopCount="999999"
|
||||
app:source="svga/gold_box_bg.svga" />
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/iv_box_open"
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="242dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="52dp"
|
||||
app:autoPlay="false"
|
||||
app:fillMode="Clear"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_box"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_box"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_box"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_box"
|
||||
app:loopCount="1"
|
||||
app:source="svga/gold_box_open.svga" />
|
||||
|
||||
@@ -151,13 +151,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="消耗 1"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="#C363E6"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_continuous_open"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_continuous_open"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_continuous_open" />
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_open" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_continuous_open"
|
||||
@@ -166,23 +165,33 @@
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text=" 糖果连续摘"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="#C363E6"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_continuous_num"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_continuous_num"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_box" />
|
||||
app:layout_constraintStart_toEndOf="@id/tv_continuous_num" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_box_edt_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_sub"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_add"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_sub"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_sub" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_sub"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/treasure_box_sub_normal"
|
||||
app:layout_constraintBottom_toTopOf="@id/iv_open"
|
||||
app:layout_constraintEnd_toStartOf="@id/edit_num"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_continuous_open" />
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_num"
|
||||
@@ -213,11 +222,9 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_open"
|
||||
android:layout_width="135dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_width="127dp"
|
||||
android:layout_height="31dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="22dp"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/click_open_box_selector"
|
||||
@@ -229,10 +236,9 @@
|
||||
android:id="@+id/ll_prize_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="135dp"
|
||||
android:layout_marginStart="7dp"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_continuous_num"
|
||||
app:layout_constraintBottom_toTopOf="@id/iv_sub"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg" />
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
@@ -242,6 +248,7 @@
|
||||
android:layout_marginStart="80dp"
|
||||
android:layout_marginTop="60dp"
|
||||
app:autoPlay="false"
|
||||
app:fillMode="Clear"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_box"
|
||||
@@ -258,6 +265,7 @@
|
||||
android:layout_marginTop="20dp"
|
||||
android:onClick="@{click}"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_bg">
|
||||
@@ -280,7 +288,19 @@
|
||||
android:text="糖果>"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fragment_container"
|
||||
android:layout_width="199dp"
|
||||
android:layout_height="287dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/bg_treasure_box_more"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
|
@@ -11,12 +11,10 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_white_top_10dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingBottom="80dp"
|
||||
android:paddingEnd="15dp">
|
||||
android:paddingStart="7dp"
|
||||
android:paddingEnd="7dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -25,38 +23,59 @@
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="更多"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="16sp" />
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_get_key"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="43dp"
|
||||
android:background="@drawable/bottom_line"
|
||||
android:layout_height="32dp"
|
||||
android:drawableEnd="@drawable/arrow_right"
|
||||
android:gravity="center_vertical"
|
||||
android:text="参与活动获得糖果"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="14sp" />
|
||||
android:textColor="#F8CBFF"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:background="#33EDEDED" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_history"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="43dp"
|
||||
android:background="@drawable/bottom_line"
|
||||
android:layout_height="32dp"
|
||||
android:drawableEnd="@drawable/arrow_right"
|
||||
android:gravity="center_vertical"
|
||||
android:text="获奖记录"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="14sp" />
|
||||
android:textColor="#F8CBFF"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:background="#33EDEDED" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_box_rule"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="43dp"
|
||||
android:layout_height="32dp"
|
||||
android:drawableEnd="@drawable/arrow_right"
|
||||
android:gravity="center_vertical"
|
||||
android:text="玩法规则"
|
||||
android:background="@drawable/bottom_line"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="14sp" />
|
||||
android:textColor="#F8CBFF"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:background="#33EDEDED" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_msg_switch"
|
||||
@@ -65,23 +84,29 @@
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="43dp"
|
||||
android:layout_height="32dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="允许中奖消息对外展示"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="14sp" />
|
||||
android:textColor="#F8CBFF"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_switch"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_25"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/icon_room_set_lock_false" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:background="#33EDEDED" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="283dp"
|
||||
|
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
tools:background="#803EDA">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rb_today"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/icon_box_rank_rb_true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:text="获奖记录"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
49
app/src/module_treasure_box/res/layout/fragment_box_rule.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:background="#803EDA">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rb_today"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/icon_box_rank_rb_true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:text="玩法规则"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="通过许愿池许愿获得的礼物放到礼物包裹,点开礼物面板即可查看"
|
||||
android:textColor="#fff8cbff"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="每次许愿100%获得礼物"
|
||||
android:textColor="#fff8cbff"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_prize_pic"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@drawable/default_cover" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:lines="1"
|
||||
android:textColor="#F8CBFF"
|
||||
android:textSize="12sp"
|
||||
tools:text="哈哈哈哈" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:includeFontPadding="false"
|
||||
android:lines="1"
|
||||
android:textColor="#F8CBFF"
|
||||
android:textSize="10sp"
|
||||
tools:text="x12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_time"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end"
|
||||
android:textColor="#ff9966e4"
|
||||
android:textSize="10sp"
|
||||
tools:text="06-30 16:00" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="#33ededed" />
|
||||
|
||||
</FrameLayout>
|