Я использую MathView внутри row_item утилита просмотра. Когда я прокручиваю свой Recyclerview, его прокрутка застряла. Возможно ли причина зависания моего recyclerView из-за MathView?
В моем коде Type = 3 - данные Mathview
if (queList[position].type == 1 || queList[position].type == 2) {
holder.txtQue!!.setText(Html.fromHtml(Html.fromHtml(queList[position].question).toString()))
holder.math_txtQue?.visibility = View.GONE
if (isQuestionAnswer(queList[position].is_correct, 1)) {
holder.txtAnswer!!.setText(Html.fromHtml(Html.fromHtml(queList[position].opt_1).toString()))
holder.math_txtAnswer?.visibility = View.GONE
}
if (isQuestionAnswer(queList[position].is_correct, 2)) {
holder.txtAnswer!!.setText(Html.fromHtml(Html.fromHtml(queList[position].opt_2).toString()))
holder.math_txtAnswer?.visibility = View.GONE
}
} else if (queList[position].type == 3) {
holder.txtQue?.visibility = View.GONE
holder.math_txtQue?.visibility = View.VISIBLE
holder.math_txtQue?.text = Html.fromHtml(queList[position].question).toString()
holder.mathDesc?.text = Html.fromHtml(queList[position].description).toString()
if (isQuestionAnswer(queList[position].is_correct, 1)) {
holder.txtAnswer?.visibility = View.GONE
/*holder.math_txtAnswer?.visibility = View.VISIBLE
holder.math_txtAnswer?.text = Html.fromHtml(queList[position].opt_1).toString()*/
}
if (isQuestionAnswer(queList[position].is_correct, 2)) {
holder.txtAnswer?.visibility = View.GONE
holder.math_txtAnswer?.visibility = View.VISIBLE
holder.math_txtAnswer?.text = Html.fromHtml(queList[position].opt_2).toString()
}
}
Файл моего макета: -
<android.support.v7.widget.RecyclerView
android:id="@+id/questionReadList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar_top"
android:background="@color/colorPrimary"
android:divider="@null"
android:nestedScrollingEnabled="false"
android:dividerHeight="0dp"></android.support.v7.widget.RecyclerView>