AndroidCharts
AndroidCharts copied to clipboard
java.lang.ClassCastException: android.view.View cannot be cast to im.dacer.androidcharts.LineView
I use the LineView like this.
<HorizontalScrollView android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="0.7" android:id="@+id/horizontalScrollView" android:layout_alignParentRight="true"> <View android:layout_width="match_parent" android:layout_height="match_parent" class="im.dacer.androidcharts.LineView" android:id="@+id/line_temp"/> </HorizontalScrollView>
and in the MainActivity. lineTemp = (LineView) rootView.findViewById(R.id.line_temp);
but, suffer the issue.Would you help me?
Use <....LineView instead of <View in xml an delete class="......"