Tag: Custom View

August 13, 2021

How to display HTML in TextView?

Display HTML in TextView

            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
                tvContent.text = Html.fromHtml("#HTML_STRING", HtmlCompat.FROM_HTML_MODE_LEGACY)
            } else {
                tvContent.text = Html.fromHtml("#HTML_STRING")
            }


August 13, 2021

Use font-awesome for Icon in android

Use font-awesome for Icon in android Here is steps to how to use font-awesome fonts in Android : Download font-awesome from here Create assets folder in app/src/main directory. Now create fonts folder in assets folder You can use it in two ways… either create Custom class which extends TextView or Manually get instance of TextView in Activity and then set font. To choose font visit this site and check all icons. Here describes both ways..   […]

August 13, 2021

custom switch library for android. Easy to use and with all customization

Custom switch library for android. Easy to use and with all customization. Follow these steps to use this switch: 1. Download customSwitchLibrary module from here2. Add it in your project.3. Add dependency to your project : compile project(path: ‘:customswitchlibrary’) 4. Now it is ready to use with your project.5. To add view in xml, write tag with this: lj.customswitchlibrary.ViewSwitch 6. Now it is ready. Customize in […]