|
|
@@ -37,6 +37,7 @@ import com.google.android.material.tabs.TabLayout
|
|
|
import com.google.android.material.tabs.TabLayoutMediator
|
|
|
import com.qmuiteam.qmui.widget.popup.QMUIPopup
|
|
|
import com.qmuiteam.qmui.widget.popup.QMUIPopups
|
|
|
+import com.adealink.weparty.R as APP_R
|
|
|
|
|
|
/**
|
|
|
* author: PengWuliang
|
|
|
@@ -76,9 +77,9 @@ class RankFragment: BaseFragment(R.layout.fragment_rank) {
|
|
|
else -> 0
|
|
|
}
|
|
|
private val genderTypeList = listOf(
|
|
|
- GenderType(getCompatString(com.adealink.weparty.R.string.common_all), TYPE_ALL, true),
|
|
|
- GenderType(getCompatString(com.adealink.weparty.R.string.common_male), TYPE_MALE, false),
|
|
|
- GenderType(getCompatString(com.adealink.weparty.R.string.common_female), TYPE_FEMALE, false)
|
|
|
+ GenderType(getCompatString(APP_R.string.common_all), TYPE_ALL, true),
|
|
|
+ GenderType(getCompatString(APP_R.string.common_male), TYPE_MALE, false),
|
|
|
+ GenderType(getCompatString(APP_R.string.common_female), TYPE_FEMALE, false)
|
|
|
)
|
|
|
|
|
|
override fun initViews() {
|
|
|
@@ -87,7 +88,7 @@ class RankFragment: BaseFragment(R.layout.fragment_rank) {
|
|
|
binding.tvGenderSelector.setCompoundDrawablesRelativeWithIntrinsicBounds(
|
|
|
null,
|
|
|
null,
|
|
|
- getCompatDrawable(com.adealink.weparty.R.drawable.common_up_arrow_32_ic),
|
|
|
+ getCompatDrawable(APP_R.drawable.common_up_arrow_32_ic),
|
|
|
null
|
|
|
)
|
|
|
showGenderPopup(binding.tvGenderSelector)
|
|
|
@@ -117,10 +118,10 @@ class RankFragment: BaseFragment(R.layout.fragment_rank) {
|
|
|
}
|
|
|
tabTitle.text = getTimeTitleBy(TIME_LIST[position])
|
|
|
if(position == TIME_LIST.indexOf(time)) {
|
|
|
- tabTitle.setTextColor(getCompatColor(com.adealink.weparty.R.color.white))
|
|
|
+ tabTitle.setTextColor(getCompatColor(APP_R.color.white))
|
|
|
timeTabBg.show()
|
|
|
} else {
|
|
|
- tabTitle.setTextColor(getCompatColor(com.adealink.weparty.R.color.color_B3FFFFFF))
|
|
|
+ tabTitle.setTextColor(getCompatColor(APP_R.color.color_B3FFFFFF))
|
|
|
timeTabBg.gone()
|
|
|
}
|
|
|
tab.customView = root
|
|
|
@@ -154,7 +155,7 @@ class RankFragment: BaseFragment(R.layout.fragment_rank) {
|
|
|
if (isSelected) {
|
|
|
time = TIME_LIST.getOrElse(tab.position) { TIME_DAILY }
|
|
|
updateRankList()
|
|
|
- customViewBinding.tabTitle.setTextColor(getCompatColor(com.adealink.weparty.R.color.white))
|
|
|
+ customViewBinding.tabTitle.setTextColor(getCompatColor(APP_R.color.white))
|
|
|
customViewBinding.timeTabBg.setImageResource(
|
|
|
when (type) {
|
|
|
TYPE_TOP_GIFT -> R.drawable.rank_contribution_time_tab_bg
|
|
|
@@ -167,7 +168,7 @@ class RankFragment: BaseFragment(R.layout.fragment_rank) {
|
|
|
)
|
|
|
customViewBinding.timeTabBg.visibility = View.VISIBLE
|
|
|
} else {
|
|
|
- customViewBinding.tabTitle.setTextColor(getCompatColor(com.adealink.weparty.R.color.color_B3FFFFFF))
|
|
|
+ customViewBinding.tabTitle.setTextColor(getCompatColor(APP_R.color.color_B3FFFFFF))
|
|
|
customViewBinding.timeTabBg.visibility = View.INVISIBLE
|
|
|
}
|
|
|
}
|
|
|
@@ -187,7 +188,7 @@ class RankFragment: BaseFragment(R.layout.fragment_rank) {
|
|
|
view.setCompoundDrawablesRelativeWithIntrinsicBounds(
|
|
|
null,
|
|
|
null,
|
|
|
- getCompatDrawable(com.adealink.weparty.R.drawable.common_down_arrow_32_ic),
|
|
|
+ getCompatDrawable(APP_R.drawable.common_down_arrow_32_ic),
|
|
|
null
|
|
|
)
|
|
|
updateRankListByGender(type.value)
|