From b34490ec2b458a48802778b2ea00850634325cbb Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 02 四月 2025 13:32:59 +0800 Subject: [PATCH] 2025年04月02日13:32:56 --- app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java | 52 +++++++++++++++++++++++++--------------------------- 1 files changed, 25 insertions(+), 27 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java b/app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java index 5849454..0469a3c 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java @@ -11,7 +11,6 @@ import android.os.Bundle; import android.provider.Settings; import android.text.TextUtils; -import android.util.Log; import android.view.View; @@ -65,7 +64,6 @@ import java.util.Calendar; import java.util.Date; import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; /** @@ -185,16 +183,16 @@ viewBinding.unitTv.setText(UnitType.kW); viewBinding.unitTextTv.setText(getString(R.string.pv_power)); viewBinding.dayTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.time_selected_39383d)); - viewBinding.dayTv.setTextColor(_mActivity.getColor(R.color.text_E6FFFFFF)); + viewBinding.dayTv.setTextColor(_mActivity.getColor(R.color.text_FFACACAC)); viewBinding.monthTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.monthTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.monthTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.yearTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.yearTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.yearTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.lifeCycleTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.lifeCycleTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.lifeCycleTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.v1.setVisibility(View.GONE); viewBinding.v2.setVisibility(View.VISIBLE); @@ -219,16 +217,16 @@ viewBinding.unitTv.setText(UnitType.kWh); viewBinding.unitTextTv.setText(getString(R.string.generation)); viewBinding.dayTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.dayTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.dayTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.monthTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.time_selected_39383d)); - viewBinding.monthTv.setTextColor(_mActivity.getColor(R.color.text_E6FFFFFF)); + viewBinding.monthTv.setTextColor(_mActivity.getColor(R.color.text_FFACACAC)); viewBinding.yearTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.yearTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.yearTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.lifeCycleTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.lifeCycleTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.lifeCycleTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.v1.setVisibility(View.GONE); viewBinding.v2.setVisibility(View.GONE); @@ -253,16 +251,16 @@ viewBinding.unitTv.setText(UnitType.kWh); viewBinding.unitTextTv.setText(getString(R.string.generation)); viewBinding.dayTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.dayTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.dayTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.monthTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.monthTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.monthTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.yearTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.time_selected_39383d)); - viewBinding.yearTv.setTextColor(_mActivity.getColor(R.color.text_E6FFFFFF)); + viewBinding.yearTv.setTextColor(_mActivity.getColor(R.color.text_FFACACAC)); viewBinding.lifeCycleTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.lifeCycleTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.lifeCycleTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.v1.setVisibility(View.VISIBLE); viewBinding.v2.setVisibility(View.GONE); @@ -285,16 +283,16 @@ viewBinding.unitTv.setText(UnitType.kWh); viewBinding.unitTextTv.setText(getString(R.string.generation)); viewBinding.dayTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.dayTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.dayTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.monthTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.monthTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.monthTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.yearTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.yearTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.yearTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.lifeCycleTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.time_selected_39383d)); - viewBinding.lifeCycleTv.setTextColor(_mActivity.getColor(R.color.text_E6FFFFFF)); + viewBinding.lifeCycleTv.setTextColor(_mActivity.getColor(R.color.text_FFACACAC)); viewBinding.v1.setVisibility(View.VISIBLE); viewBinding.v2.setVisibility(View.VISIBLE); @@ -399,12 +397,12 @@ // .setTitleText(_mActivity.getString(R.string.time_selectd))//鏍囬鏂囧瓧 .setOutSideCancelable(true)//鐐瑰嚮灞忓箷锛岀偣鍦ㄦ帶浠跺閮ㄨ寖鍥存椂锛屾槸鍚﹀彇娑堟樉绀� .isCyclic(false)//鏄惁寰幆婊氬姩 -// .setTitleColor(_mActivity.getColor(R.color.text_E6FFFFFF))//鏍囬鏂囧瓧棰滆壊 - .setSubmitColor(_mActivity.getColor(R.color.text_E6FFFFFF))//纭畾鎸夐挳鏂囧瓧棰滆壊 +// .setTitleColor(_mActivity.getColor(R.color.text_FFACACAC))//鏍囬鏂囧瓧棰滆壊 + .setSubmitColor(_mActivity.getColor(R.color.text_FFACACAC))//纭畾鎸夐挳鏂囧瓧棰滆壊 .setCancelColor(_mActivity.getColor(R.color.text_FF8E8E8E))//鍙栨秷鎸夐挳鏂囧瓧棰滆壊 .setTitleBgColor(_mActivity.getColor(R.color.text_FF222222))//鏍囬鑳屾櫙棰滆壊 Night mode .setBgColor(_mActivity.getColor(R.color.text_FF222222))//婊氳疆鑳屾櫙棰滆壊 Night mode - .setTextColorCenter(_mActivity.getColor(R.color.text_E6FFFFFF)).setDate(selectedDate)// 濡傛灉涓嶈缃殑璇濓紝榛樿鏄郴缁熸椂闂�*/ + .setTextColorCenter(_mActivity.getColor(R.color.text_FFACACAC)).setDate(selectedDate)// 濡傛灉涓嶈缃殑璇濓紝榛樿鏄郴缁熸椂闂�*/ .setRangDate(startDate, endDate)//璧峰缁堟骞存湀鏃ヨ瀹� .setLabel(_mActivity.getString(R.string.year), _mActivity.getString(R.string.month), _mActivity.getString(R.string.day), _mActivity.getString(R.string.hour), _mActivity.getString(R.string.minute), _mActivity.getString(R.string.seconds))//榛樿璁剧疆涓哄勾鏈堟棩鏃跺垎绉� .isCenterLabel(false) //鏄惁鍙樉绀轰腑闂撮�変腑椤圭殑label鏂囧瓧锛宖alse鍒欐瘡椤筰tem鍏ㄩ儴閮藉甫鏈塴abel銆� @@ -455,13 +453,13 @@ viewBinding.dayTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.time_selected_39383d)); - viewBinding.dayTv.setTextColor(_mActivity.getColor(R.color.text_E6FFFFFF)); + viewBinding.dayTv.setTextColor(_mActivity.getColor(R.color.text_FFACACAC)); viewBinding.monthTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.monthTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.monthTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.yearTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.yearTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.yearTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.lifeCycleTv.setBackground(AppCompatResources.getDrawable(_mActivity, R.color.text_00000000)); - viewBinding.lifeCycleTv.setTextColor(_mActivity.getColor(R.color.text_66FFFFFF)); + viewBinding.lifeCycleTv.setTextColor(_mActivity.getColor(R.color.text_FF5B5B5B)); viewBinding.v1.setVisibility(View.GONE); viewBinding.v2.setVisibility(View.VISIBLE); viewBinding.v3.setVisibility(View.VISIBLE); @@ -539,7 +537,7 @@ } String capacityValue = HdlCommonLogic.divideByOneThousandAndFormat(dataOverBean.getInstalledCapacity()).toString(); viewBinding.infoRl1Text1Tv.setText(capacityValue); - viewBinding.kwpUnit.setText(HdlCommonLogic.convertWPUnit(dataOverBean.getInstalledCapacity())); + viewBinding.kwpUnit.setText(HdlCommonLogic.convertKWPUnit(dataOverBean.getInstalledCapacity())); viewBinding.infoRl1Text3Tv.setText(HdlCommonLogic.convertDoubleValue(dataOverBean.getPower())); // String str = dataOverBean.getPowerRatio() + "%"; @@ -549,7 +547,7 @@ // //璁剧疆绗竴閮ㄥ垎鏂囧瓧鐨勫瓧浣撳ぇ灏� // spannableString.setSpan(new AbsoluteSizeSpan((int) UnitConversionUtils.dpToPx(HDLApp.getInstance(), 12)), startIndex, endIndex, 0); // // 鍒涘缓涓�涓狥oregroundColorSpan瀵硅薄锛屽弬鏁版槸棰滆壊鍊� -// ForegroundColorSpan colorSpan = new ForegroundColorSpan(HDLApp.getInstance().getColor(R.color.text_66FFFFFF)); +// ForegroundColorSpan colorSpan = new ForegroundColorSpan(HDLApp.getInstance().getColor(R.color.text_FF5B5B5B)); // spannableString.setSpan(colorSpan, startIndex, endIndex, 0); // viewBinding.infoRl1FText1Tv.setText(spannableString); viewBinding.infoRl1FText1Tv.setText(dataOverBean.getPowerRatio()); -- Gitblit v1.8.0