string.xml Here is my string
<string name="bullet_text"><font color="#38d98a">●</font>\t\tCucumber Detox Water (1 glass)\n<font color="#38d98a">●</font>\t\tSkimmed Milk (1 glass)\n<font color="#38d98a">●</font>\t\tPeas Poha (1.5 katori)</string>
When this string is used in xml it works perfectly but when using this string programmatically then it does not works
xml code
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bullet_text"
android:textSize="20sp"
android:layout_margin="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
Working Perfectly
Kotlin Code
val textView:TextView = findViewById(R.id.textView)
textView.text = getString(R.string.bullet_text)
Not Working Perfectly
– Yaqoob Bhatti Sep 16 '21 at 12:50