Skip to content

Commit fcc06d6

Browse files
committed
[demo] Used html spanned for article detail
1 parent 6567473 commit fcc06d6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

demo/src/main/java/com/mta/tehreer/demo/LabelWidgetActivity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
package com.mta.tehreer.demo;
1818

1919
import android.os.Bundle;
20+
import android.text.Html;
21+
import android.text.Spanned;
2022

2123
import androidx.appcompat.app.ActionBar;
2224
import androidx.appcompat.app.AppCompatActivity;
@@ -32,6 +34,12 @@ protected void onCreate(Bundle savedInstanceState) {
3234
if (actionBar != null) {
3335
actionBar.setDisplayHomeAsUpEnabled(true);
3436
}
37+
38+
String htmlString = getResources().getString(R.string.article_detail);
39+
Spanned articleSpanned = Html.fromHtml(htmlString);
40+
41+
LinkableLabel nastaleeqLabel = findViewById(R.id.label_nastaleeq);
42+
nastaleeqLabel.setSpanned(articleSpanned);
3543
}
3644

3745
@Override

0 commit comments

Comments
 (0)