<ysn.com.stock.view.CapitalView
android:id="@+id/capital_activity_view2"
android:layout_width="match_parent"
android:layout_height="210dp"
cv:cv_in_flow_digits="3"
cv:cv_in_flow_unit="1000"
cv:cv_price_digits="2"
cv:cv_left_title="@string/capital_left_title"
cv:cv_right_title="今日资金净流入(千元)"
cv:cv_bg_color="@color/capital_bg"
cv:cv_column_line_color="@color/capital_column_line"
cv:cv_finance_in_flow_color="@color/capital_finance_in_flow"
cv:cv_main_in_flow_color="@color/capital_main_in_flow"
cv:cv_price_color="@color/capital_price"
cv:cv_retail_in_flow_color="@color/capital_retail_in_flow"
cv:cv_row_line_color="@color/capital_row_line"
cv:cv_text_color="@color/capital_text"
android:layout_marginTop="50dp" />
Capital capital = new Capital();
ArrayList<CapitalData> capitalDataList = new ArrayList<>();
for (CapitalTime.DataBean dataBean : capitalTime.getData()) {
CapitalData data = new CapitalData(
dataBean.getPrice(),
dataBean.getFinanceInFlow(),
dataBean.getMainInFlow(),
dataBean.getRetailInFlow());
capitalDataList.add(data);
capital.findPriceExtremum(dataBean.getPrice())
.checkInFlowExtremum(data.getFinanceInFlow(), data.getMainInFlow(), data.getRetailInFlow());
}
capital.setData(capitalDataList);