private void startChartFragment() { if (TextUtils.isEmpty(lineType)) { this.lineType = LineType.avg.value; } chartView = new ChartViewBuilder().category(this.category).lineType(this.lineType).build(); chartView.setHasExternalView(true); FragmentManager fm = getActivity().getSupportFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); ft.replace(R.id.rl_kline_container, chartView); ft.commitAllowingStateLoss(); }
public void setInfo(Category category, Quote quote, String lineType) { this.category = category; this.quote = quote; this.lineType = lineType; if (getView() != null) { setupUIData(getView()); if (chartView != null) { if (TextUtils.isEmpty(lineType)) { this.lineType = LineType.avg.value; } chartView.setInfo(this.category, this.lineType); setupTitle(getView()); } } }