1.宝箱逻辑修改
2.添加音乐去掉共享音乐
This commit is contained in:
@@ -27,6 +27,8 @@ import com.yizhuan.xchat_android_core.bean.RoomQueueInfo;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.FaceAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomInfoAttachment;
|
||||
import com.yizhuan.xchat_android_core.initial.InitialModel;
|
||||
import com.yizhuan.xchat_android_core.initial.bean.InitInfo;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.manager.IMNetEaseManager;
|
||||
import com.yizhuan.xchat_android_core.manager.RoomEvent;
|
||||
@@ -818,11 +820,15 @@ public class HomePartyPresenter extends BaseMvpPresenter<IHomePartyView> {
|
||||
|
||||
public void loadMessageHistory() {
|
||||
RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
|
||||
if (roomInfo == null) return;
|
||||
if (!roomInfo.isCloseScreen()) {
|
||||
int count = 10;
|
||||
InitInfo initInfo = InitialModel.get().getCacheInitInfo();
|
||||
if (initInfo != null) count = initInfo.getRoomMessageCount();
|
||||
NIMClient.getService(ChatRoomService.class)
|
||||
.pullMessageHistoryExType(String.valueOf(roomInfo.getRoomId()), 0,
|
||||
10, QueryDirectionEnum.QUERY_OLD, new MsgTypeEnum[]{MsgTypeEnum.text})
|
||||
count, QueryDirectionEnum.QUERY_OLD, new MsgTypeEnum[]{MsgTypeEnum.text})
|
||||
.setCallback(new RequestCallbackWrapper<List<ChatRoomMessage>>() {
|
||||
@Override
|
||||
public void onResult(int code, List<ChatRoomMessage> result, Throwable exception) {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 363 KiB |
@@ -58,8 +58,9 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_official"
|
||||
android:layout_width="@dimen/dp_13"
|
||||
android:layout_height="@dimen/dp_13"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:src="@mipmap/ic_user_official_13dp"
|
||||
android:visibility="gone"
|
||||
@@ -67,8 +68,9 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_noble_level"
|
||||
android:layout_width="15dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:visibility="visible"
|
||||
tools:src="@mipmap/ic_user_level_king"
|
||||
@@ -104,8 +106,9 @@
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_user_charm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_17"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:adjustViewBounds="true"
|
||||
tools:src="@mipmap/ic_user_level"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
@@ -199,7 +199,6 @@
|
||||
android:visibility="@{(ktvModel || roomInfo.type==5) ? View.GONE : View.VISIBLE}">
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -207,6 +206,7 @@
|
||||
android:text="房间榜"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
@@ -219,9 +219,10 @@
|
||||
android:id="@+id/iv_treasure_box"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_below="@id/contribute_list"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_above="@id/bottom_view"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/icon_room_treasure_box"
|
||||
tools:contentDescription="开宝箱" />
|
||||
|
@@ -51,7 +51,7 @@ public class MusicListActivity extends BaseMvpActivity<IMusicListView, MusicList
|
||||
@BindView(R.id.iv_back)
|
||||
ImageView backIcon;
|
||||
|
||||
private final String[] titles = {"我的曲库", "共享音乐"};
|
||||
private final String[] titles = {"我的曲库"};
|
||||
private int page = 0;
|
||||
private List<Fragment> fragments = new ArrayList<>();
|
||||
private PagerDataAdapter adapter = new PagerDataAdapter(getSupportFragmentManager());
|
||||
@@ -80,7 +80,7 @@ public class MusicListActivity extends BaseMvpActivity<IMusicListView, MusicList
|
||||
setContentView(R.layout.activity_music_list);
|
||||
ButterKnife.bind(this);
|
||||
fragments.add(LocalMusicListFragment.newInstance());
|
||||
fragments.add(ShareMusicListFragment.newInstance());
|
||||
// fragments.add(ShareMusicListFragment.newInstance());
|
||||
adapter.setData(fragments);
|
||||
viewPager.setAdapter(adapter);
|
||||
slidingTabLayout.setViewPager(viewPager, titles);
|
||||
|
@@ -79,12 +79,12 @@
|
||||
<!-- animation view-->
|
||||
|
||||
<RelativeLayout
|
||||
android:visibility="invisible"
|
||||
android:id="@+id/music_box_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="61dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/transparent">
|
||||
android:background="@color/transparent"
|
||||
android:visibility="invisible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/cb_select_all"
|
||||
@@ -152,7 +152,8 @@
|
||||
android:gravity="center"
|
||||
android:text="添加共享音乐"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
<!-- empty view-->
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<ImageView
|
||||
android:id="@+id/iv_empty_img"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_above="@+id/tv_tips_empty"
|
||||
android:layout_height="220dp"
|
||||
android:layout_above="@+id/tv_tips_empty"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:scaleType="matrix"
|
||||
android:src="@drawable/icon_common_failure" />
|
||||
@@ -23,21 +23,21 @@
|
||||
android:id="@+id/tv_tips_empty"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:text="你的音乐列表空空如也\n赶紧去添加音乐吧"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="13sp"
|
||||
android:text="你的音乐列表空空如也\n赶紧去添加音乐吧"/>
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_empty_option"
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_below="@id/tv_share_music_option"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="23dp"
|
||||
android:background="@drawable/bg_binding_button"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_below="@id/tv_share_music_option"
|
||||
android:gravity="center"
|
||||
android:text="扫描本地音乐"
|
||||
android:textColor="@color/white"
|
||||
@@ -47,14 +47,15 @@
|
||||
android:id="@+id/tv_share_music_option"
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_below="@id/tv_tips_empty"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="23dp"
|
||||
android:background="@drawable/bg_binding_button"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_below="@id/tv_tips_empty"
|
||||
android:gravity="center"
|
||||
android:text="添加共享音乐"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
@@ -7,7 +7,9 @@ import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
@@ -35,6 +37,7 @@ import com.yizhuan.xchat_android_core.utils.StringUtils;
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes;
|
||||
import com.yizhuan.xchat_android_library.utils.FormatUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -87,8 +90,15 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
});
|
||||
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
|
||||
if (walletInfo != null) {
|
||||
mBinding.tvDiamondNum.setText(FormatUtils.formatBigDecimal(walletInfo.getDiamondNum()));
|
||||
mBinding.tvDiamondNum.setText(FormatUtils.formatBigInteger(walletInfo.getDiamondNum()));
|
||||
}
|
||||
mBinding.editNum.addTextChangedListener(new TextWatcherWrapper(){
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
int num = StringUtils.toInt(mBinding.editNum.getText().toString(), 0);
|
||||
mBinding.tvContinuousNum.setText("消耗"+num);
|
||||
}
|
||||
});
|
||||
loadKeyInfo();
|
||||
looperPrize();
|
||||
}
|
||||
@@ -151,7 +161,7 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
return true;
|
||||
}
|
||||
if (keyNum < count) {
|
||||
getDialogManager().showOkCancelDialog("参与活动获得66流星", "去参与",
|
||||
getDialogManager().showOkCancelDialog("参与活动获得流星", "去参与",
|
||||
() -> DialogWebViewActivity.start(context, UriProvider.getBoxKey()));
|
||||
return true;
|
||||
}
|
||||
|
@@ -7,6 +7,7 @@ import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
@@ -35,6 +36,7 @@ import com.yizhuan.xchat_android_core.utils.StringUtils;
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes;
|
||||
import com.yizhuan.xchat_android_library.utils.FormatUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -62,7 +64,7 @@ public class TreasureBoxHonourActivity extends BaseBindingActivity<ActivityTreas
|
||||
super.onCreate(savedInstanceState);
|
||||
//这里的height用MATCH_PARENT状态栏会被顶上去,不知道什么鬼
|
||||
height = ScreenUtil.screenHeight - ScreenUtil.getStatusBarHeight(context);
|
||||
getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, ScreenUtil.screenHeight-ScreenUtil.getStatusBarHeight(context));
|
||||
getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, ScreenUtil.screenHeight - ScreenUtil.getStatusBarHeight(context));
|
||||
getWindow().setGravity(Gravity.BOTTOM);
|
||||
subscribeEvent();
|
||||
}
|
||||
@@ -86,8 +88,16 @@ public class TreasureBoxHonourActivity extends BaseBindingActivity<ActivityTreas
|
||||
});
|
||||
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
|
||||
if (walletInfo != null) {
|
||||
mBinding.tvDiamondNum.setText(FormatUtils.formatBigDecimal(walletInfo.getDiamondNum()));
|
||||
mBinding.tvDiamondNum.setText(FormatUtils.formatBigInteger(walletInfo.getDiamondNum()));
|
||||
}
|
||||
|
||||
mBinding.editNum.addTextChangedListener(new TextWatcherWrapper() {
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
int num = StringUtils.toInt(mBinding.editNum.getText().toString(), 0);
|
||||
mBinding.tvContinuousNum.setText("消耗" + num * 10);
|
||||
}
|
||||
});
|
||||
loadKeyInfo();
|
||||
looperPrize();
|
||||
}
|
||||
@@ -151,7 +161,7 @@ public class TreasureBoxHonourActivity extends BaseBindingActivity<ActivityTreas
|
||||
return true;
|
||||
}
|
||||
if (keyNum < count) {
|
||||
getDialogManager().showOkCancelDialog("参与活动获得66流星", "去参与",
|
||||
getDialogManager().showOkCancelDialog("参与活动获得流星", "去参与",
|
||||
() -> DialogWebViewActivity.start(context, UriProvider.getBoxKey()));
|
||||
return true;
|
||||
}
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.2 KiB |
@@ -67,7 +67,6 @@
|
||||
android:onClick="@{click}"
|
||||
android:padding="@dimen/dp_9"
|
||||
android:src="@drawable/icon_room_box_more_normal"
|
||||
android:text="帮助"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
@@ -123,16 +122,32 @@
|
||||
app:layout_constraintStart_toStartOf="@id/iv_box"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_box" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_continuous_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="消耗1"
|
||||
android:textColor="#fff15fc3"
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_continuous_open"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="7dp"
|
||||
android:drawableStart="@drawable/treasure_box_meteor"
|
||||
android:gravity="center"
|
||||
android:text="连续开启"
|
||||
android:textColor="#fff15fc3"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_continuous_num"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_box" />
|
||||
|
||||
<ImageView
|
||||
|
@@ -67,7 +67,6 @@
|
||||
android:onClick="@{click}"
|
||||
android:padding="@dimen/dp_9"
|
||||
android:src="@drawable/icon_room_box_more_normal"
|
||||
android:text="帮助"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
@@ -123,18 +122,37 @@
|
||||
app:layout_constraintStart_toStartOf="@id/iv_box"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_box" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_continuous_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="消耗10"
|
||||
android:textColor="#fff15fc3"
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_continuous_open"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="7dp"
|
||||
android:drawableStart="@drawable/treasure_box_meteor"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center"
|
||||
android:paddingStart="5dp"
|
||||
android:text="连续开启"
|
||||
android:textColor="#fff15fc3"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_continuous_num"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_box" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_sub"
|
||||
android:layout_width="wrap_content"
|
||||
|
@@ -34,7 +34,7 @@
|
||||
android:layout_height="43dp"
|
||||
android:background="@drawable/bottom_line"
|
||||
android:gravity="center_vertical"
|
||||
android:text="参与活动获得66流星"
|
||||
android:text="参与活动获得流星"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
@@ -172,7 +172,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="66流星>"
|
||||
android:text="流星>"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
@@ -97,6 +97,8 @@ public class InitInfo implements Serializable {
|
||||
*/
|
||||
private List<String> domainList;
|
||||
|
||||
private int roomMessageCount;
|
||||
|
||||
@Data
|
||||
public class AppUpgradePackageAddress implements Serializable{
|
||||
private String androidUrl;
|
||||
|
@@ -21,6 +21,16 @@ public class FormatUtils {
|
||||
return "0.00";
|
||||
}
|
||||
|
||||
public static String formatBigInteger(double bigDecimal) {
|
||||
try {
|
||||
DecimalFormat decimalFormat = new DecimalFormat("#,##0");
|
||||
decimalFormat.setRoundingMode(RoundingMode.HALF_UP);
|
||||
return decimalFormat.format(bigDecimal);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return "0";
|
||||
}
|
||||
|
||||
/**
|
||||
* 把过长的金额类数字,转换成两位小数带万,亿,兆 缩写
|
||||
* 10000.00 -> 1.00万 丢掉两位小数后面的小数
|
||||
|
Reference in New Issue
Block a user