Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

android highlight part of textview

String newString = oldString.replaceAll(textToHighlight, "<font color='red'>"+textToHighlight+"</font>");
textView.setText(Html.fromHtml(newString));
Comment

PREVIOUS NEXT
Code Example
Java :: border bottom android xml 
Java :: array ausgeben java 
Java :: java stop execution 
Java :: collect as arr java 8 
Java :: java close tcp socket output stream but not socket 
Java :: java trim method 
Java :: jsp import 
Java :: how to set landscape in android studio 
Java :: Update UI on main thread Android 
Java :: PlatformException (PlatformException(error, Neither user 10024 nor current process has android.permission.WAKE_LOCK., null, java.lang.SecurityException: Neither user 10024 nor current process has android.permission.WAKE_LOCK. 
Java :: java max integer 
Java :: formartted string java 
Java :: display image from database in java servlet 
Java :: convert hashset to array 
Java :: java shorthand if 
Java :: get first 5 characters of string java 
Java :: anagram java program 
Java :: spigot remove every entity 
Java :: transformez integer en string 
Java :: how to move from one activity to another in android studio on button click 
Java :: how to reset jframe java swing 
Java :: install java 8 arch 
Java :: how to take an element out of an array at a certain index in java 
Java :: counting sort java 
Java :: java stack 
Java :: how to add music to java 
Java :: android get text from string xml programmatically 
Java :: java 8 functional interfaces 
Java :: event api spigot 
Java :: fibonacci series in java using recursion 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =