[Modify]收入统计调整
This commit is contained in:
@@ -50,27 +50,6 @@ object PhotoProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 喵圈发布动态专用,去掉bmp格式的图片
|
|
||||||
*/
|
|
||||||
@JvmStatic
|
|
||||||
@JvmOverloads
|
|
||||||
fun photoProviderPublish(activity: Activity, maxSelect: Int = 1, canChooseGif: Boolean = false, resultCode: Int, isClearCache: Boolean = true) {
|
|
||||||
cancelJop()
|
|
||||||
mPhotoJob = MainScope().launch {
|
|
||||||
if (isClearCache && isClearByTime()) {
|
|
||||||
withContext(Dispatchers.IO) { clearCache() }
|
|
||||||
}
|
|
||||||
EasyPhotos.createAlbum(activity, false, false, GlideEngine())//参数说明:上下文,是否显示相机按钮,是否使用宽高数据(false时宽高数据为0,扫描速度更快),[配置Glide为图片加载引擎](https://github.com/HuanTanSheng/EasyPhotos/wiki/12-%E9%85%8D%E7%BD%AEImageEngine%EF%BC%8C%E6%94%AF%E6%8C%81%E6%89%80%E6%9C%89%E5%9B%BE%E7%89%87%E5%8A%A0%E8%BD%BD%E5%BA%93)
|
|
||||||
.setCount(maxSelect)//参数说明:最大可选数,默认1
|
|
||||||
.setGif(canChooseGif)
|
|
||||||
.filter(JPEG, JPG, PNG, WEBP)
|
|
||||||
.setPuzzleMenu(false)
|
|
||||||
.setCleanMenu(false)
|
|
||||||
.start(resultCode)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
fun videoProvider(activity: Activity, maxSelect: Int = 1, resultCode: Int, isClearCache: Boolean = true) {
|
fun videoProvider(activity: Activity, maxSelect: Int = 1, resultCode: Int, isClearCache: Boolean = true) {
|
||||||
|
@@ -37,6 +37,9 @@ class GoldDetailActivity : BaseViewBindingActivity<ActivityGoldDetailBinding>(),
|
|||||||
|
|
||||||
private var settlementList: Map<Long, HallMemberGoldFlowTotalInfo>? = null
|
private var settlementList: Map<Long, HallMemberGoldFlowTotalInfo>? = null
|
||||||
|
|
||||||
|
private var mDiamondArrow = false
|
||||||
|
private var mGoldArrow = false
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@@ -107,6 +110,7 @@ class GoldDetailActivity : BaseViewBindingActivity<ActivityGoldDetailBinding>(),
|
|||||||
|
|
||||||
mGoldRoomAdapter.setOnItemSelectListener(object : GoldRoomAdapter.OnItemSelectListener {
|
mGoldRoomAdapter.setOnItemSelectListener(object : GoldRoomAdapter.OnItemSelectListener {
|
||||||
override fun onItemSelect(position: Int) {
|
override fun onItemSelect(position: Int) {
|
||||||
|
reverseStatus()
|
||||||
val settlementList: HallMemberGoldFlowTotalInfo? =
|
val settlementList: HallMemberGoldFlowTotalInfo? =
|
||||||
settlementList?.get(mGoldRoomAdapter.data[position].hallId)
|
settlementList?.get(mGoldRoomAdapter.data[position].hallId)
|
||||||
mGoldDetailAdapter.setNewData(settlementList?.hallMember)
|
mGoldDetailAdapter.setNewData(settlementList?.hallMember)
|
||||||
@@ -146,15 +150,52 @@ class GoldDetailActivity : BaseViewBindingActivity<ActivityGoldDetailBinding>(),
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
binding.llDiamondArrow.setOnClickListener {
|
binding.tvDiamondArrow.setOnClickListener {
|
||||||
val list = mGoldDetailAdapter.data.sortBy { it.giftDiamonds }
|
if(!mDiamondArrow){
|
||||||
|
mDiamondArrow = true
|
||||||
|
binding.ivDiamondTop.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_black_top))
|
||||||
|
binding.ivDiamondBottom.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_gray_bottom))
|
||||||
|
val data = mGoldDetailAdapter.data
|
||||||
|
data.sortBy { it.giftDiamonds }
|
||||||
|
mGoldDetailAdapter.setNewData(data)
|
||||||
|
}else{
|
||||||
|
mDiamondArrow = false
|
||||||
|
binding.ivDiamondTop.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_gray_top))
|
||||||
|
binding.ivDiamondBottom.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_black_bottom))
|
||||||
|
val data = mGoldDetailAdapter.data
|
||||||
|
data.sortByDescending { it.giftDiamonds }
|
||||||
|
mGoldDetailAdapter.setNewData(data)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.llGoldArrow.setOnClickListener {
|
binding.tvGoldArrow.setOnClickListener {
|
||||||
val list = mGoldDetailAdapter.data.sortBy { it.remainGolds }
|
if(!mGoldArrow){
|
||||||
|
mGoldArrow = true
|
||||||
|
binding.ivGoldTop.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_black_top))
|
||||||
|
binding.ivGoldDown.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_gray_bottom))
|
||||||
|
val data = mGoldDetailAdapter.data
|
||||||
|
data.sortBy { it.remainGolds }
|
||||||
|
mGoldDetailAdapter.setNewData(data)
|
||||||
|
}else{
|
||||||
|
mGoldArrow = false
|
||||||
|
binding.ivGoldTop.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_gray_top))
|
||||||
|
binding.ivGoldDown.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_black_bottom))
|
||||||
|
val data = mGoldDetailAdapter.data
|
||||||
|
data.sortByDescending { it.remainGolds }
|
||||||
|
mGoldDetailAdapter.setNewData(data)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun reverseStatus() {
|
||||||
|
mDiamondArrow = false
|
||||||
|
mGoldArrow = false
|
||||||
|
binding.ivDiamondTop.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_gray_top))
|
||||||
|
binding.ivDiamondBottom.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_black_bottom))
|
||||||
|
binding.ivGoldTop.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_gray_top))
|
||||||
|
binding.ivGoldDown.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_black_bottom))
|
||||||
|
}
|
||||||
|
|
||||||
private fun initModel() {
|
private fun initModel() {
|
||||||
getWeekIncomeTotal(earnRecordModel.getWeekFirstDay(), earnRecordModel.getWeekLastDay())
|
getWeekIncomeTotal(earnRecordModel.getWeekFirstDay(), earnRecordModel.getWeekLastDay())
|
||||||
|
|
||||||
@@ -205,6 +246,7 @@ class GoldDetailActivity : BaseViewBindingActivity<ActivityGoldDetailBinding>(),
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun getTime(chooseTime: Long, weekFirstDay: String?, weekLastDay: String?) {
|
override fun getTime(chooseTime: Long, weekFirstDay: String?, weekLastDay: String?) {
|
||||||
|
reverseStatus()
|
||||||
earnRecordModel.setmWeekChooseDay(chooseTime)
|
earnRecordModel.setmWeekChooseDay(chooseTime)
|
||||||
weekFirstDay?.let { earnRecordModel.setWeekFirstDay(it) }
|
weekFirstDay?.let { earnRecordModel.setWeekFirstDay(it) }
|
||||||
weekLastDay?.let { earnRecordModel.setWeekLastDay(it) }
|
weekLastDay?.let { earnRecordModel.setWeekLastDay(it) }
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
package com.yizhuan.erban.earn.adapter
|
package com.yizhuan.erban.earn.adapter
|
||||||
|
|
||||||
import android.widget.TextView
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
import com.chad.library.adapter.base.BaseViewHolder
|
import com.chad.library.adapter.base.BaseViewHolder
|
||||||
import com.yizhuan.erban.R
|
import com.yizhuan.erban.R
|
||||||
import com.yizhuan.erban.ui.user.adapter.UserInfoIndicatorAdapter
|
|
||||||
import com.yizhuan.erban.ui.utils.ImageLoadUtilsV2
|
import com.yizhuan.erban.ui.utils.ImageLoadUtilsV2
|
||||||
import com.yizhuan.xchat_android_core.earn.bean.HallVo
|
import com.yizhuan.xchat_android_core.earn.bean.HallVo
|
||||||
|
|
||||||
|
@@ -130,6 +130,7 @@
|
|||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_diamond_arrow"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/diamond_pay_list"
|
android:text="@string/diamond_pay_list"
|
||||||
@@ -178,6 +179,7 @@
|
|||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_gold_arrow"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/settleable_gold_coin"
|
android:text="@string/settleable_gold_coin"
|
||||||
|
@@ -7,8 +7,6 @@
|
|||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recyclerView"
|
android:id="@+id/recyclerView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent" />
|
||||||
android:overScrollMode="never"
|
|
||||||
android:scrollbars="none" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
BIN
app/src/main/res/mipmap-xhdpi/ic_arrow_black_top.webp
Normal file
BIN
app/src/main/res/mipmap-xhdpi/ic_arrow_black_top.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 644 B |
BIN
app/src/main/res/mipmap-xhdpi/ic_arrow_gray_bottom.webp
Normal file
BIN
app/src/main/res/mipmap-xhdpi/ic_arrow_gray_bottom.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 656 B |
@@ -1,15 +1,14 @@
|
|||||||
package com.zhihu.matisse.internal.utils;
|
package com.zhihu.matisse.internal.utils;
|
||||||
|
|
||||||
import android.annotation.TargetApi;
|
|
||||||
import android.content.ContentUris;
|
import android.content.ContentUris;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Environment;
|
|
||||||
import android.provider.DocumentsContract;
|
import android.provider.DocumentsContract;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
|
|
||||||
|
import com.yizhuan.xchat_android_library.common.file.FileHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* http://stackoverflow.com/a/27271131/4739220
|
* http://stackoverflow.com/a/27271131/4739220
|
||||||
*/
|
*/
|
||||||
@@ -24,7 +23,6 @@ public class PathUtils {
|
|||||||
* @param uri The Uri to query.
|
* @param uri The Uri to query.
|
||||||
* @author paulburke
|
* @author paulburke
|
||||||
*/
|
*/
|
||||||
@TargetApi(Build.VERSION_CODES.KITKAT)
|
|
||||||
public static String getPath(final Context context, final Uri uri) {
|
public static String getPath(final Context context, final Uri uri) {
|
||||||
// DocumentProvider
|
// DocumentProvider
|
||||||
if (Platform.hasKitKat() && DocumentsContract.isDocumentUri(context, uri)) {
|
if (Platform.hasKitKat() && DocumentsContract.isDocumentUri(context, uri)) {
|
||||||
@@ -35,7 +33,7 @@ public class PathUtils {
|
|||||||
final String type = split[0];
|
final String type = split[0];
|
||||||
|
|
||||||
if ("primary".equalsIgnoreCase(type)) {
|
if ("primary".equalsIgnoreCase(type)) {
|
||||||
return Environment.getExternalStorageDirectory() + "/" + split[1];
|
return FileHelper.getRootFilesDir(null).getAbsolutePath() + "/" + split[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO handle non-primary volumes
|
// TODO handle non-primary volumes
|
||||||
|
@@ -4,9 +4,11 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||||
import androidx.viewpager.widget.ViewPager;
|
import androidx.viewpager.widget.ViewPager;
|
||||||
@@ -17,7 +19,6 @@ import com.yizhuan.erban.R;
|
|||||||
import com.yizhuan.erban.base.BaseMvpActivity;
|
import com.yizhuan.erban.base.BaseMvpActivity;
|
||||||
import com.yizhuan.erban.module_hall.hall.view.dialog.TimePickerDialog;
|
import com.yizhuan.erban.module_hall.hall.view.dialog.TimePickerDialog;
|
||||||
import com.yizhuan.erban.module_hall.hall.view.indicator.StatisticsIndicatorAdapter;
|
import com.yizhuan.erban.module_hall.hall.view.indicator.StatisticsIndicatorAdapter;
|
||||||
import com.yizhuan.erban.module_hall.income.ClanIncomeFragment;
|
|
||||||
import com.yizhuan.erban.module_hall.income.DayIncomeFragment;
|
import com.yizhuan.erban.module_hall.income.DayIncomeFragment;
|
||||||
import com.yizhuan.erban.module_hall.income.GoldRecordFragment;
|
import com.yizhuan.erban.module_hall.income.GoldRecordFragment;
|
||||||
import com.yizhuan.erban.module_hall.income.presenter.IncomeStatisticsPresenter;
|
import com.yizhuan.erban.module_hall.income.presenter.IncomeStatisticsPresenter;
|
||||||
@@ -30,10 +31,8 @@ import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
|||||||
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter;
|
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter;
|
||||||
import com.yizhuan.xchat_android_library.utils.CommonUtils;
|
import com.yizhuan.xchat_android_library.utils.CommonUtils;
|
||||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||||
import com.yizhuan.xchat_android_library.utils.TimeUtils;
|
|
||||||
import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
|
import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -73,8 +72,20 @@ public class IncomeStatisticsActivity extends BaseMvpActivity<IIncomeStatisticsV
|
|||||||
LinearLayout llDayList;
|
LinearLayout llDayList;
|
||||||
@BindView(R.id.ll_gold_list)
|
@BindView(R.id.ll_gold_list)
|
||||||
LinearLayout llGoldList;
|
LinearLayout llGoldList;
|
||||||
|
@BindView(R.id.iv_diamond_top)
|
||||||
|
ImageView iv_diamond_top;
|
||||||
|
@BindView(R.id.iv_diamond_bottom)
|
||||||
|
ImageView iv_diamond_bottom;
|
||||||
|
@BindView(R.id.iv_gold_top)
|
||||||
|
ImageView iv_gold_top;
|
||||||
|
@BindView(R.id.iv_gold_bottom)
|
||||||
|
ImageView iv_gold_bottom;
|
||||||
|
|
||||||
private long hallId;
|
private long hallId;
|
||||||
|
|
||||||
|
private boolean mDiamondArrow = false;
|
||||||
|
private boolean mGoldArrow = false;
|
||||||
|
|
||||||
public static void start(Context context, long hallId) {
|
public static void start(Context context, long hallId) {
|
||||||
|
|
||||||
StatisticManager.Instance().onEvent(BasicConfig.INSTANCE.getAppContext(),
|
StatisticManager.Instance().onEvent(BasicConfig.INSTANCE.getAppContext(),
|
||||||
@@ -210,9 +221,39 @@ public class IncomeStatisticsActivity extends BaseMvpActivity<IIncomeStatisticsV
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@OnClick({R.id.iv_date_arrow, R.id.ll_day_group})
|
@OnClick({R.id.iv_date_arrow, R.id.ll_day_group, R.id.tv_diamond_arrow, R.id.tv_gold_arrow})
|
||||||
public void onViewClicked(View view) {
|
public void onViewClicked(View view) {
|
||||||
switch (view.getId()) {
|
switch (view.getId()) {
|
||||||
|
case R.id.tv_diamond_arrow:
|
||||||
|
if(!mDiamondArrow){
|
||||||
|
mDiamondArrow = true;
|
||||||
|
iv_diamond_top.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_black_top));
|
||||||
|
iv_diamond_bottom.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_gray_bottom));
|
||||||
|
GoldRecordFragment goldRecordFragment = (GoldRecordFragment) list.get(2);
|
||||||
|
goldRecordFragment.setDiamondSort(true);
|
||||||
|
}else{
|
||||||
|
mDiamondArrow = false;
|
||||||
|
iv_diamond_top.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_gray_top));
|
||||||
|
iv_diamond_bottom.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_black_bottom));
|
||||||
|
GoldRecordFragment goldRecordFragment = (GoldRecordFragment) list.get(2);
|
||||||
|
goldRecordFragment.setDiamondSort(false);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case R.id.tv_gold_arrow:
|
||||||
|
if(!mGoldArrow){
|
||||||
|
mGoldArrow = true;
|
||||||
|
iv_gold_top.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_black_top));
|
||||||
|
iv_gold_bottom.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_gray_bottom));
|
||||||
|
GoldRecordFragment goldRecordFragment = (GoldRecordFragment) list.get(2);
|
||||||
|
goldRecordFragment.setRemainSort(true);
|
||||||
|
}else{
|
||||||
|
mGoldArrow = false;
|
||||||
|
iv_gold_top.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_gray_top));
|
||||||
|
iv_gold_bottom.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_black_bottom));
|
||||||
|
GoldRecordFragment goldRecordFragment = (GoldRecordFragment) list.get(2);
|
||||||
|
goldRecordFragment.setRemainSort(false);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case R.id.iv_date_arrow:
|
case R.id.iv_date_arrow:
|
||||||
case R.id.ll_day_group:
|
case R.id.ll_day_group:
|
||||||
if (CommonUtils.isFastDoubleClick(500)) return;
|
if (CommonUtils.isFastDoubleClick(500)) return;
|
||||||
@@ -242,6 +283,10 @@ public class IncomeStatisticsActivity extends BaseMvpActivity<IIncomeStatisticsV
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getTime(long chooseTime, String weekFirstDay, String weekLastDay) {
|
public void getTime(long chooseTime, String weekFirstDay, String weekLastDay) {
|
||||||
|
if(mCurrentType == TYPE_GOLD) {
|
||||||
|
reverseStatus();
|
||||||
|
}
|
||||||
|
|
||||||
IncomeStatisticsPresenter presenter = getMvpPresenter();
|
IncomeStatisticsPresenter presenter = getMvpPresenter();
|
||||||
|
|
||||||
if (mCurrentType == TYPE_DAY) {
|
if (mCurrentType == TYPE_DAY) {
|
||||||
@@ -253,7 +298,7 @@ public class IncomeStatisticsActivity extends BaseMvpActivity<IIncomeStatisticsV
|
|||||||
presenter.setWeekFirstDay(weekFirstDay);
|
presenter.setWeekFirstDay(weekFirstDay);
|
||||||
presenter.setWeekLastDay(weekLastDay);
|
presenter.setWeekLastDay(weekLastDay);
|
||||||
getIncomeTotal("", weekFirstDay, weekLastDay);
|
getIncomeTotal("", weekFirstDay, weekLastDay);
|
||||||
} else if (mCurrentType == TYPE_GOLD){
|
} else if (mCurrentType == TYPE_GOLD) {
|
||||||
presenter.setmWeekChooseDay(chooseTime);
|
presenter.setmWeekChooseDay(chooseTime);
|
||||||
presenter.setWeekFirstDay(weekFirstDay);
|
presenter.setWeekFirstDay(weekFirstDay);
|
||||||
presenter.setWeekLastDay(weekLastDay);
|
presenter.setWeekLastDay(weekLastDay);
|
||||||
@@ -262,6 +307,15 @@ public class IncomeStatisticsActivity extends BaseMvpActivity<IIncomeStatisticsV
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void reverseStatus() {
|
||||||
|
mDiamondArrow = false;
|
||||||
|
mGoldArrow = false;
|
||||||
|
iv_diamond_top.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_gray_top));
|
||||||
|
iv_diamond_bottom.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_black_bottom));
|
||||||
|
iv_gold_top.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_gray_top));
|
||||||
|
iv_gold_bottom.setImageDrawable(ContextCompat.getDrawable(context,R.mipmap.ic_arrow_black_bottom));
|
||||||
|
}
|
||||||
|
|
||||||
private void getIncomeTotal(String day, String weekFirstDay, String weekLastDay) {
|
private void getIncomeTotal(String day, String weekFirstDay, String weekLastDay) {
|
||||||
|
|
||||||
if (mCurrentType == TYPE_DAY) {
|
if (mCurrentType == TYPE_DAY) {
|
||||||
|
@@ -75,6 +75,30 @@ class GoldRecordFragment : BaseViewBindingFragment<FragmentAssociationBinding>()
|
|||||||
earnRecordModel.getHallMemberTotalList(startTimeStr, endTimeStr)
|
earnRecordModel.getHallMemberTotalList(startTimeStr, endTimeStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun setDiamondSort(status: Boolean){
|
||||||
|
if(status) {
|
||||||
|
val data = mGoldDetailAdapter.data
|
||||||
|
data.sortBy { it.giftDiamonds }
|
||||||
|
mGoldDetailAdapter.setNewData(data)
|
||||||
|
}else{
|
||||||
|
val data = mGoldDetailAdapter.data
|
||||||
|
data.sortByDescending { it.giftDiamonds }
|
||||||
|
mGoldDetailAdapter.setNewData(data)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setRemainSort(status: Boolean){
|
||||||
|
if(status) {
|
||||||
|
val data = mGoldDetailAdapter.data
|
||||||
|
data.sortBy { it.remainGolds }
|
||||||
|
mGoldDetailAdapter.setNewData(data)
|
||||||
|
}else{
|
||||||
|
val data = mGoldDetailAdapter.data
|
||||||
|
data.sortByDescending { it.remainGolds }
|
||||||
|
mGoldDetailAdapter.setNewData(data)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun setTotal(total: Long) {
|
private fun setTotal(total: Long) {
|
||||||
mDayIncomeFragmentListener?.setTotal(total)
|
mDayIncomeFragmentListener?.setTotal(total)
|
||||||
}
|
}
|
||||||
|
@@ -202,25 +202,28 @@
|
|||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_diamond_arrow"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/diamond_pay_list"
|
android:text="@string/total_income_diamond"
|
||||||
android:textColor="@color/color_1F1A4E"
|
android:textColor="@color/color_1F1A4E"
|
||||||
android:textSize="@dimen/sp_12" />
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_arrow"
|
android:id="@+id/ll_diamond_arrow"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_marginStart="@dimen/dp_3"
|
android:layout_marginStart="@dimen/dp_3"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/iv_diamond_top"
|
||||||
android:src="@mipmap/ic_arrow_gray_top"
|
android:src="@mipmap/ic_arrow_gray_top"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/iv_diamond_bottom"
|
||||||
android:src="@mipmap/ic_arrow_black_bottom"
|
android:src="@mipmap/ic_arrow_black_bottom"
|
||||||
android:layout_marginTop="@dimen/dp_2"
|
android:layout_marginTop="@dimen/dp_2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -246,6 +249,7 @@
|
|||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_gold_arrow"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/settleable_gold_coin"
|
android:text="@string/settleable_gold_coin"
|
||||||
@@ -253,17 +257,20 @@
|
|||||||
android:textSize="@dimen/sp_12" />
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_gold_arrow"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_marginStart="@dimen/dp_3"
|
android:layout_marginStart="@dimen/dp_3"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/iv_gold_top"
|
||||||
android:src="@mipmap/ic_arrow_gray_top"
|
android:src="@mipmap/ic_arrow_gray_top"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/iv_gold_bottom"
|
||||||
android:src="@mipmap/ic_arrow_black_bottom"
|
android:src="@mipmap/ic_arrow_black_bottom"
|
||||||
android:layout_marginTop="@dimen/dp_2"
|
android:layout_marginTop="@dimen/dp_2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
Reference in New Issue
Block a user