I want to set the textSize value of the snippet below to a textSize of an XML file, how to achieve this?
holder.tvValue.setTextSize();
in the xml it is like this:
<TextView
android:id="@+id/tv_title"
android:textSize="32sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
I am assuming you are using Java here. This method
TextView.setTextSize(float size);requires you to enter a value as the parameter. Try enteringholder.tvValue.setTextSize(32f);. Let me know if this helps you