Show style and ul li tag in android Textview
up vote
0
down vote
favorite
I have String with ul,li and style tag in it. And I am trying to show them in HTML formatting in textview.
String
<style type='text/css'>
ul
{
list-style-type: circle;
font-size: 16px;
}
<div style='font-family: Montserrat;line-height: 30px; text-align: left; color: #383838;'>
<ul>
<li>
Hello Everyone <span style='font-weight: 600; color: #b49fe1;'>Good Morning</span> How are You ?.</br>
</li>
<li>
Good morning <span style='color: #b49fe1;font-weight: 600;'>Have a nice day</span>.</br>
</li>
</ul>
textView.setText(Html.fromHtml(myHtmlText));
But textview shows the plain text.
SomeHow i managed to convert the ul and li tag by using this but didn't look like i want .
Is anyone know How can I have use style,ul and li tag in textview?
android html css
add a comment |
up vote
0
down vote
favorite
I have String with ul,li and style tag in it. And I am trying to show them in HTML formatting in textview.
String
<style type='text/css'>
ul
{
list-style-type: circle;
font-size: 16px;
}
<div style='font-family: Montserrat;line-height: 30px; text-align: left; color: #383838;'>
<ul>
<li>
Hello Everyone <span style='font-weight: 600; color: #b49fe1;'>Good Morning</span> How are You ?.</br>
</li>
<li>
Good morning <span style='color: #b49fe1;font-weight: 600;'>Have a nice day</span>.</br>
</li>
</ul>
textView.setText(Html.fromHtml(myHtmlText));
But textview shows the plain text.
SomeHow i managed to convert the ul and li tag by using this but didn't look like i want .
Is anyone know How can I have use style,ul and li tag in textview?
android html css
usewebview
instead
– V-rund Puro-hit
Nov 15 at 7:24
Thankyou @Sultan Mahmud But i found a library that works fine for me MarkDown Library
– Rahul Chaudhary
Nov 15 at 7:56
@V-rundPuro-hit webview not converting the Font tags that's why i use Markdown View Library.
– Rahul Chaudhary
Nov 15 at 10:51
Android does not support CSS in TextView
– Onik
Nov 15 at 18:52
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have String with ul,li and style tag in it. And I am trying to show them in HTML formatting in textview.
String
<style type='text/css'>
ul
{
list-style-type: circle;
font-size: 16px;
}
<div style='font-family: Montserrat;line-height: 30px; text-align: left; color: #383838;'>
<ul>
<li>
Hello Everyone <span style='font-weight: 600; color: #b49fe1;'>Good Morning</span> How are You ?.</br>
</li>
<li>
Good morning <span style='color: #b49fe1;font-weight: 600;'>Have a nice day</span>.</br>
</li>
</ul>
textView.setText(Html.fromHtml(myHtmlText));
But textview shows the plain text.
SomeHow i managed to convert the ul and li tag by using this but didn't look like i want .
Is anyone know How can I have use style,ul and li tag in textview?
android html css
I have String with ul,li and style tag in it. And I am trying to show them in HTML formatting in textview.
String
<style type='text/css'>
ul
{
list-style-type: circle;
font-size: 16px;
}
<div style='font-family: Montserrat;line-height: 30px; text-align: left; color: #383838;'>
<ul>
<li>
Hello Everyone <span style='font-weight: 600; color: #b49fe1;'>Good Morning</span> How are You ?.</br>
</li>
<li>
Good morning <span style='color: #b49fe1;font-weight: 600;'>Have a nice day</span>.</br>
</li>
</ul>
textView.setText(Html.fromHtml(myHtmlText));
But textview shows the plain text.
SomeHow i managed to convert the ul and li tag by using this but didn't look like i want .
Is anyone know How can I have use style,ul and li tag in textview?
android html css
android html css
edited Nov 15 at 7:25
asked Nov 15 at 7:00
Rahul Chaudhary
66
66
usewebview
instead
– V-rund Puro-hit
Nov 15 at 7:24
Thankyou @Sultan Mahmud But i found a library that works fine for me MarkDown Library
– Rahul Chaudhary
Nov 15 at 7:56
@V-rundPuro-hit webview not converting the Font tags that's why i use Markdown View Library.
– Rahul Chaudhary
Nov 15 at 10:51
Android does not support CSS in TextView
– Onik
Nov 15 at 18:52
add a comment |
usewebview
instead
– V-rund Puro-hit
Nov 15 at 7:24
Thankyou @Sultan Mahmud But i found a library that works fine for me MarkDown Library
– Rahul Chaudhary
Nov 15 at 7:56
@V-rundPuro-hit webview not converting the Font tags that's why i use Markdown View Library.
– Rahul Chaudhary
Nov 15 at 10:51
Android does not support CSS in TextView
– Onik
Nov 15 at 18:52
use
webview
instead– V-rund Puro-hit
Nov 15 at 7:24
use
webview
instead– V-rund Puro-hit
Nov 15 at 7:24
Thankyou @Sultan Mahmud But i found a library that works fine for me MarkDown Library
– Rahul Chaudhary
Nov 15 at 7:56
Thankyou @Sultan Mahmud But i found a library that works fine for me MarkDown Library
– Rahul Chaudhary
Nov 15 at 7:56
@V-rundPuro-hit webview not converting the Font tags that's why i use Markdown View Library.
– Rahul Chaudhary
Nov 15 at 10:51
@V-rundPuro-hit webview not converting the Font tags that's why i use Markdown View Library.
– Rahul Chaudhary
Nov 15 at 10:51
Android does not support CSS in TextView
– Onik
Nov 15 at 18:52
Android does not support CSS in TextView
– Onik
Nov 15 at 18:52
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
You are using CSS but CSS is not supported in android. You can use webview instead.
Below tags are supported in android.For more details look here
br
p
div
em
b
strong
cite
dfn
i
big
small
font
blockquote
tt
monospace
a
u
sup
sub
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You are using CSS but CSS is not supported in android. You can use webview instead.
Below tags are supported in android.For more details look here
br
p
div
em
b
strong
cite
dfn
i
big
small
font
blockquote
tt
monospace
a
u
sup
sub
add a comment |
up vote
0
down vote
You are using CSS but CSS is not supported in android. You can use webview instead.
Below tags are supported in android.For more details look here
br
p
div
em
b
strong
cite
dfn
i
big
small
font
blockquote
tt
monospace
a
u
sup
sub
add a comment |
up vote
0
down vote
up vote
0
down vote
You are using CSS but CSS is not supported in android. You can use webview instead.
Below tags are supported in android.For more details look here
br
p
div
em
b
strong
cite
dfn
i
big
small
font
blockquote
tt
monospace
a
u
sup
sub
You are using CSS but CSS is not supported in android. You can use webview instead.
Below tags are supported in android.For more details look here
br
p
div
em
b
strong
cite
dfn
i
big
small
font
blockquote
tt
monospace
a
u
sup
sub
answered Nov 15 at 7:24
Sultan Mahmud
23017
23017
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53314016%2fshow-style-and-ul-li-tag-in-android-textview%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
use
webview
instead– V-rund Puro-hit
Nov 15 at 7:24
Thankyou @Sultan Mahmud But i found a library that works fine for me MarkDown Library
– Rahul Chaudhary
Nov 15 at 7:56
@V-rundPuro-hit webview not converting the Font tags that's why i use Markdown View Library.
– Rahul Chaudhary
Nov 15 at 10:51
Android does not support CSS in TextView
– Onik
Nov 15 at 18:52