android


String questionText=“Hello good evenin${b}${u} Amit is the best ${/u}${/b} and he loves singing”; [closed]


How to get the underline & bold text from that string..
I need output like Hello good evening "underline&bold" and he loves singing.
Use this for bold and underline
String tempString="yourString";
SpannableString spanString = new SpannableString(tempString);
spanString.setSpan(new UnderlineSpan(), 0, spanString.length(), 0);
spanString.setSpan(new StyleSpan(Typeface.BOLD), 0, spanString.length(), 0);
It is simple as you like.
Message = "<HTML><BODY><U><B>TEST STRING</BODY></HTML>"; //or Message = "<U><B>TEST STRING</B></U>";
Textview.setText(Html.fromHtml(Message));
you just need to add html formatted string to textview so it will render as per html format.
Use
textview.setText(Html.toHtml(myString));
where you can use html tags to make bold and underlined in the myString variable.
say
myString="My name is <b> Naresh</b>...";

Related Links

TabLayout ViewPager Icon Show at Corners in Android
android How to get values from thread to mainUI
Can we uninstall application without user's consent
Webview error API 19 below
Android: saving and reading data from user's input?
convert android xml drawable to sgv (reverse android studio function)
Facebook Integration in Android Studio [closed]
Realm for android data file size on API 21 is higher than Api 17
Calculate the total travelled distance Google Maps API V3 in Android
Android - Extrac SameSite=Strict cookie from Webview or URL
Android Studio: CoordinatorLayout could not be initiated
could not found method crashlystic() in.fabric
How to give run time permission for marshmallow for read SMS from inbox in eclipse
Calling Android native method fail
How to use LatLngBounds?
how to save edittext value in a listview to android sqlite?

Categories

HOME
pyqt
powerpoint
sublimetext
nuget
rendering
barcode
syntaxnet
project
32bit-64bit
endeca
windows-ce
why3
naivebayes
eip
azure-iot-hub
job-scheduling
ag
guzzle
ksh
qliksense
jquery-callback
itunes
syntax-highlighting
motion-detection
appirater
8051
exchangewebservices
jaws
volatile
kodi
angularjs-material
memory-address
laravel-eloquent
dsx-desktop
login-script
getpixel
slacktextviewcontroller
least-squares
batching
fiware-cygnus
video-capture
engine.io
openproject
flatmap
sim-card
verifiable-c
p4merge
news
skylink
bindingnavigator
knime
snapchat
vaadin-elements
builder
rserve
trojan
stdmap
android-testing
mouseleave
branch-prediction
juice-ui
flex-monkey
freepbx
spreadjs
pushbots
sciruby
coda
rpart
typeconverter
snackbar
bcache
ghcjs
administration
sonarqube-5.0
wcm
unix-socket
tinyxml
gnumeric
ecslidingviewcontroller
gwt-openlayers
oocss
cffile
observium
virtual-pc
web-notifications
panda3d
frameworkelementfactory
jquery-blockui
cuda-gdb
multiplexing
gobject-introspection
saxparseexception
clrstoredprocedure
socketserver
nhprof
facebook-iframe
silverlight-oob
asynchronous-wcf-call
dojo-dnd
entitykey
soappy

Resources

Encrypt Message