[Modify]公会长-金币明细页面新增每周数据展示
This commit is contained in:
@@ -49,10 +49,8 @@ class EarnRecordActivity : BaseViewBindingActivity<ActivityEarnRecordBinding>(),
|
||||
binding.tvGoldNum.text = String.format(it.golds.toString())
|
||||
if (it.isClanElder) {
|
||||
binding.tvGoldDetail.visibility = View.VISIBLE
|
||||
binding.tvConvertWithdraw.visibility = View.VISIBLE
|
||||
} else {
|
||||
binding.tvGoldDetail.visibility = View.GONE
|
||||
binding.tvConvertWithdraw.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@ package com.yizhuan.erban.earn.activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.view.View
|
||||
import androidx.activity.viewModels
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
@@ -27,7 +28,7 @@ import com.yizhuan.xchat_android_library.utils.FormatUtils
|
||||
* 金币明细
|
||||
*/
|
||||
class GoldDetailActivity : BaseViewBindingActivity<ActivityGoldDetailBinding>(),
|
||||
TimePickerGoldDialog.TimePickerListener {
|
||||
TimePickerGoldDialog.TimePickerListener, View.OnClickListener {
|
||||
|
||||
private val earnRecordModel: EarnRecordViewModel by viewModels()
|
||||
|
||||
@@ -83,31 +84,6 @@ class GoldDetailActivity : BaseViewBindingActivity<ActivityGoldDetailBinding>(),
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
binding.llDate.setOnClickListener {
|
||||
val builder = TimePickerGoldDialog.Builder()
|
||||
.setType(Type.YEAR_MONTH_DAY)
|
||||
.setTitleStringId("")
|
||||
.setThemeColor(ContextCompat.getColor(this, R.color.line_color))
|
||||
.setWheelItemTextNormalColor(
|
||||
ContextCompat.getColor(
|
||||
this,
|
||||
R.color.timetimepicker_default_text_color
|
||||
)
|
||||
)
|
||||
.setWheelItemTextSelectorColor(
|
||||
ContextCompat.getColor(
|
||||
this,
|
||||
R.color.black
|
||||
)
|
||||
) // 根据上一次选中时间初始化日期控件
|
||||
.setCurrentMillseconds(earnRecordModel.getmWeekChooseDay())
|
||||
.setmIsWeek(true)
|
||||
.setIsMonth(false)
|
||||
|
||||
val dialog = builder.build()
|
||||
dialog.setmTimePickerListener(this)
|
||||
dialog.show(supportFragmentManager, "year_month_day")
|
||||
}
|
||||
|
||||
mGoldRoomAdapter.setOnItemSelectListener(object : GoldRoomAdapter.OnItemSelectListener {
|
||||
override fun onItemSelect(position: Int) {
|
||||
@@ -151,50 +127,145 @@ class GoldDetailActivity : BaseViewBindingActivity<ActivityGoldDetailBinding>(),
|
||||
|
||||
})
|
||||
|
||||
binding.tvDiamondArrow.setOnClickListener {
|
||||
binding.llDate.setOnClickListener(this)
|
||||
binding.llDiamondArrow.setOnClickListener(this)
|
||||
binding.tvDiamondArrow.setOnClickListener(this)
|
||||
binding.llGoldArrow.setOnClickListener(this)
|
||||
binding.tvGoldArrow.setOnClickListener(this)
|
||||
|
||||
}
|
||||
|
||||
override fun onClick(view: View?) {
|
||||
when (view?.id) {
|
||||
R.id.llDate -> {
|
||||
val builder = TimePickerGoldDialog.Builder()
|
||||
.setType(Type.YEAR_MONTH_DAY)
|
||||
.setTitleStringId("")
|
||||
.setThemeColor(ContextCompat.getColor(this, R.color.line_color))
|
||||
.setWheelItemTextNormalColor(
|
||||
ContextCompat.getColor(
|
||||
this,
|
||||
R.color.timetimepicker_default_text_color
|
||||
)
|
||||
)
|
||||
.setWheelItemTextSelectorColor(
|
||||
ContextCompat.getColor(
|
||||
this,
|
||||
R.color.black
|
||||
)
|
||||
) // 根据上一次选中时间初始化日期控件
|
||||
.setCurrentMillseconds(earnRecordModel.getmWeekChooseDay())
|
||||
.setmIsWeek(true)
|
||||
.setIsMonth(false)
|
||||
|
||||
val dialog = builder.build()
|
||||
dialog.setmTimePickerListener(this)
|
||||
dialog.show(supportFragmentManager, "year_month_day")
|
||||
}
|
||||
R.id.tv_diamond_arrow, R.id.ll_diamond_arrow -> {
|
||||
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))
|
||||
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))
|
||||
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.tvGoldArrow.setOnClickListener {
|
||||
R.id.tv_gold_arrow, R.id.ll_gold_arrow -> {
|
||||
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))
|
||||
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))
|
||||
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))
|
||||
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() {
|
||||
|
@@ -126,8 +126,10 @@
|
||||
android:textColor="@color/color_572714"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvGold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:text="123,456,789,000" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
@@ -145,6 +147,7 @@
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:corner="@dimen/dp_20"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvConvertWithdraw"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@@ -61,7 +61,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="90dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
@@ -70,28 +70,105 @@
|
||||
android:background="@drawable/bg_gold_detail"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvEarn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:text="@string/members_sum_up_as_gold"
|
||||
android:textColor="@color/color_572714"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold" />
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvGoldCoin"
|
||||
android:text="@string/basic_summary_counts_as_gold"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:textColor="@color/color_572714"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="@+id/tvEarn"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvEarn"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvTotalGold"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvGuildRevenue"
|
||||
android:text="@string/guild_revenue"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:textColor="@color/color_572714"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
app:layout_constraintStart_toEndOf="@+id/tvGoldCoin"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/tvGoldCoin"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvMemberGold"
|
||||
android:text="@string/total_member_gold"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:textColor="@color/color_572714"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
app:layout_constraintStart_toEndOf="@+id/tvGuildRevenue"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/tvGuildRevenue"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvMemberExchange"
|
||||
android:text="@string/total_member_exchange"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:textColor="@color/color_572714"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
app:layout_constraintStart_toEndOf="@+id/tvMemberGold"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/tvMemberGold"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvTotalGold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginBottom="@dimen/dp_14"
|
||||
android:text="0.00"
|
||||
android:textColor="@color/color_572714"
|
||||
android:textSize="@dimen/text_size_24"
|
||||
android:textStyle="bold" />
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintStart_toStartOf="@+id/tvEarn"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvGuildRevenueGold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0.00"
|
||||
android:textColor="@color/color_572714"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintStart_toStartOf="@+id/tvGuildRevenue"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/tvTotalGold"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvAllMemberGold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0.00"
|
||||
android:textColor="@color/color_572714"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintStart_toStartOf="@+id/tvMemberGold"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/tvTotalGold"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvMemberExchangeGold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0.00"
|
||||
android:textColor="@color/color_572714"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintStart_toStartOf="@+id/tvMemberExchange"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/tvTotalGold"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -140,23 +217,23 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_diamond_arrow"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginStart="@dimen/dp_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_3"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_diamond_top"
|
||||
android:src="@mipmap/ic_arrow_gray_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_arrow_gray_top" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_diamond_bottom"
|
||||
android:src="@mipmap/ic_arrow_black_bottom"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:src="@mipmap/ic_arrow_black_bottom" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -189,23 +266,23 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_gold_arrow"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginStart="@dimen/dp_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_3"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gold_top"
|
||||
android:src="@mipmap/ic_arrow_gray_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_arrow_gray_top" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gold_down"
|
||||
android:src="@mipmap/ic_arrow_black_bottom"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:src="@mipmap/ic_arrow_black_bottom" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@@ -4990,7 +4990,7 @@
|
||||
<string name="consume_gold">消耗金幣</string>
|
||||
<string name="consume_gold_num">%s金幣</string>
|
||||
<string name="gold_detail">金幣明細</string>
|
||||
<string name="members_sum_up_as_gold">成員總結算金幣</string>
|
||||
<string name="members_sum_up_as_gold">本周收益</string>
|
||||
<string name="member">成員</string>
|
||||
<string name="belong_room">房間</string>
|
||||
<string name="diamond_pay_list">鉆石流水</string>
|
||||
@@ -5019,5 +5019,9 @@
|
||||
<string name="diamond_name">鉆</string>
|
||||
<string name="have_converted">已兌:%s</string>
|
||||
<string name="total_income_diamond">總收入(鉆石)</string>
|
||||
<string name="basic_summary_counts_as_gold">基礎總結算金币 =</string>
|
||||
<string name="guild_revenue">公會收益 +</string>
|
||||
<string name="total_member_gold">成員總金幣 -</string>
|
||||
<string name="total_member_exchange">成員總兌換</string>
|
||||
|
||||
</resources>
|
@@ -221,9 +221,10 @@ public class IncomeStatisticsActivity extends BaseMvpActivity<IIncomeStatisticsV
|
||||
}
|
||||
};
|
||||
|
||||
@OnClick({R.id.iv_date_arrow, R.id.ll_day_group, R.id.tv_diamond_arrow, R.id.tv_gold_arrow})
|
||||
@OnClick({R.id.iv_date_arrow, R.id.ll_day_group, R.id.tv_diamond_arrow, R.id.tv_gold_arrow, R.id.ll_diamond_arrow, R.id.ll_gold_arrow})
|
||||
public void onViewClicked(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.ll_diamond_arrow:
|
||||
case R.id.tv_diamond_arrow:
|
||||
if(!mDiamondArrow){
|
||||
mDiamondArrow = true;
|
||||
@@ -239,6 +240,7 @@ public class IncomeStatisticsActivity extends BaseMvpActivity<IIncomeStatisticsV
|
||||
goldRecordFragment.setDiamondSort(false);
|
||||
}
|
||||
break;
|
||||
case R.id.ll_gold_arrow:
|
||||
case R.id.tv_gold_arrow:
|
||||
if(!mGoldArrow){
|
||||
mGoldArrow = true;
|
||||
|
Reference in New Issue
Block a user