Browse Source

yu.jie 解决ma不显示问题

yu jie 4 năm trước cách đây
mục cha
commit
bbbf06d8f2

+ 6 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/chart/ChartActivity.kt

@@ -191,6 +191,7 @@ class ChartActivity : BaseActivity<ChartViewModel>() , View.OnClickListener {
                         viewModel.queryTimeChart()
                         progressBar.visibility = View.VISIBLE
                         timeChartView.setUpTextInGone(chart_title)
+                        timeChartView.setIsTimeChart(true)
                     }
                     1,2,3,11,12,13,14 -> {
                         isTimeChart = false
@@ -198,6 +199,7 @@ class ChartActivity : BaseActivity<ChartViewModel>() , View.OnClickListener {
                         timeChartView.visibility = View.INVISIBLE
                         viewModel.queryKChart( tab.tag.toString())
                         progressBar.visibility = View.VISIBLE
+                        kChartView.setIsTimeChart(false)
                     }
                 }
             }
@@ -246,6 +248,10 @@ class ChartActivity : BaseActivity<ChartViewModel>() , View.OnClickListener {
         }
     }
 
+    fun getIsTimeChart():Boolean {
+        return isTimeChart
+    }
+
     override fun onDestroy() {
         super.onDestroy()
         EventBus.getDefault().unregister(this)

+ 5 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/chart/old/timeCharts/KChartView.java

@@ -342,4 +342,9 @@ public class KChartView extends FrameLayout  implements ITouchEventResponse {
                     }
                 }
     }
+
+    private boolean isTimeCharts = false;
+    public void setIsTimeChart(boolean isTimeChart){
+        this.isTimeCharts = isTimeChart;
+    }
 }

+ 6 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/chart/old/timeCharts/TimeChartView.java

@@ -137,7 +137,7 @@ public class TimeChartView extends FrameLayout implements ITouchEventResponse {
         lineChart.setLineData(lines);
         lineChart.setDatasNum(timeChartData.getHistoryDatas().size());
 
-        if (textView != null) {
+        if (textView != null && isTimeCharts) {
             setTimeText(this.textView);
         }
 
@@ -257,4 +257,9 @@ public class TimeChartView extends FrameLayout implements ITouchEventResponse {
         }
     }
 
+    private boolean isTimeCharts = false;
+    public void setIsTimeChart(boolean isTimeChart){
+       this.isTimeCharts = isTimeChart;
+    }
+
 }