From b75795836a851a13e54cc4efb597262fb448217c Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期三, 08 五月 2024 15:22:01 +0800 Subject: [PATCH] 2024年05月08日15:21:54 --- app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 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 474231d..b13c13a 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 @@ -7,8 +7,9 @@ import android.text.TextUtils; import android.view.View; -import androidx.annotation.RequiresPermission; + import androidx.appcompat.content.res.AppCompatResources; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import com.bigkoo.pickerview.builder.TimePickerBuilder; import com.bigkoo.pickerview.listener.OnTimeSelectListener; @@ -17,7 +18,6 @@ import com.github.AAChartModel.AAChartCore.AAChartCreator.AAChartView; import com.github.AAChartModel.AAChartCore.AAChartCreator.AAMoveOverEventMessageModel; import com.hdl.linkpm.sdk.core.exception.HDLException; -import com.hdl.photovoltaic.HDLApp; import com.hdl.photovoltaic.R; import com.hdl.photovoltaic.base.CustomBaseFragment; import com.hdl.photovoltaic.config.ConstantManage; @@ -265,7 +265,17 @@ viewBinding.yearMonthDayTv.setText(time); } }); + //璁剧疆涓嬫媺绠ご棰滆壊 + viewBinding.srl.setColorSchemeResources(R.color.text_FF245EC3); + viewBinding.srl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { + @Override + public void onRefresh() { + viewBinding.srl.setRefreshing(false); + readDate(); + } + }); } + /** * 鏃堕棿閫夋嫨鍣� */ @@ -334,7 +344,7 @@ } else if (TimeType.month.equals(timeType) || TimeType.year.equals(timeType) || TimeType.all.equals(timeType)) { - aaChartModel = configureColorfulColumnChart(); + aaChartModel = configureColorfulColumnChart("Pv鍙戠數鍔熺巼", fieldNames, fieldValues); } aaChartView.aa_drawChartWithChartModel(aaChartModel); } @@ -371,9 +381,6 @@ viewBinding.homePageStationSelectTimeLl.setVisibility(View.VISIBLE); setUpAAChartView();//鍥捐〃鍔犺浇 } - - - @Override -- Gitblit v1.8.0