android


How to set this html String to textview with textcolor in android? [closed]


String data="<span style=\"color:#a52a2a;\">युद्ध प्रारंभ होने से पूर्व युधिष्ठिर रथ </span>से उतरकर पैदल ही पितामह भीष्म के पास गए तथा उनके चरणस्पर्श करके उन्हें प्रणाम किया। इसी प्रकार युधिष्ठिर ने कृपाचार्य और द्रोणाचार्य को भी प्रणाम किया तथा विजय का आशीर्वाद प्राप्त किया। युधिष्ठिर की धर्म-नीति को देखकर धृतराष्ट्र का पुत्र युयुत्सु इतना प्रभावित हुआ कि कौरन-सेना छोड़कर पांडवों से जा मिला।\n" +
"<h2>\n" +
"\tपहले दिन का युद्ध</h2>\n";
need this text in textview with color..
I just want to set this html to textview with his attribte and color and size
To set HTML in the TextView:
myTextView.setText(Html.fromHtml("<span style=\"color:#a52a2a;\">युद्ध प्रारंभ होने से पूर्व युधिष्ठिर रथ </span>से उतरकर पैदल ही पितामह भीष्म के पास गए तथा उनके चरणस्पर्श करके उन्हें प्रणाम किया। इसी प्रकार युधिष्ठिर ने कृपाचार्य और द्रोणाचार्य को भी प्रणाम किया तथा विजय का आशीर्वाद प्राप्त किया। युधिष्ठिर की धर्म-नीति को देखकर धृतराष्ट्र का पुत्र युयुत्सु इतना प्रभावित हुआ कि कौरन-सेना छोड़कर पांडवों से जा मिला।\n" +
"<h2>\n" +
"\tपहले दिन का युद्ध</h2>\n", Html.FROM_HTML_MODE_COMPACT));
To change the color of the TextView:
holder.text.setTextColor(Color.BLUE);
How to display HTML in TextView? that would help you in setting the HTML to textview . And in the xml part of the textview simply type textcolor and it'll suggest you to add Android:textColor where you specify the appropriate color for you text

Related Links

Android listview item click is not working
ECPM after migrating to new Admob
Android BreadCrumbs spereator
how to uninstall apps on my rooted phone
Creating margins to don't drag from out of screen imageview
How to load video thumbnails using square picasso library?
How to get date format for specific country in my android Date picker?
Moving object to touch position acting unexpectedly
Check if number exists, if it does - get another
PhoneGap Android app only working on certain Android versions
How to detect someone's sim card is active or not
ListView Delete Icon
In Fragment Navigation Drawer. I am getting error in getActionBar.Can I know why and what is the error
Getting error “Root access rejected” in android application
How to keep transmitting data in Android Bluetooth connection?
gcm canonical id should be updated or not

Categories

HOME
prism
jmeter
css3
ns-3
interface
serialization
knitr
vscode-extensions
pkcs#11
joomla3.0
minecraft-forge
windows-ce
emoji
ycsb
rtf
openbugs
radgridview
renjin
symfony-console
sigma.js
apache2.4
kendo-mobile
jquery-ias
cgbitmapcontext
flask-sqlalchemy
monit
interbase
angularjs-components
tpm
send
volatile
left-join
playstation-portable
catch-unit-test
github3.py
gojs
instantiation
sql-server-ce
watchman
xdocreport
railstutorial.org
mongoose-schema
chef-solo
spring-mvc-test
wmp
linqpad
logback-groovy
drupal-theming
wc
photos
apache-spark-dataset
dapper-simplecrud
snapchat
clarifai
facebook-pixel
activeperl
zenhub
pair-programming
java-bytecode-asm
quicktime
simplepie
meteor-packages
uicolor
lazybones
ess
coda
pax-exam
slash
mod-proxy
alloy-ui
canvg
snackbar
bufferedinputstream
android-broadcast
procedural-programming
uncaught-typeerror
spy++
rickshaw
imagefilter
gii
with-statement
parallel-testing
lnk
spring-remoting
multitasking
ice-cube
facebook-timeline
server-administration
http-status-code-410
virtual-pc
fb.ui
wimax
curb
fsevents
inline-formset
globals
cfwindow
lxr
build-environment
sun
interop-domino
dsoframer
cardspace

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App