Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.text.Html;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class Main {
    private static void makeHtml(ViewGroup viewGroup) {
        for (int i = 0; i < viewGroup.getChildCount(); i++) {
            final View childView = viewGroup.getChildAt(i);
            if (childView instanceof TextView) {
                final TextView curr = (TextView) childView;
                curr.setText(Html.fromHtml(curr.getText().toString()));
            }

            if (childView instanceof ViewGroup) {
                makeHtml((ViewGroup) childView);
            }
        }
    }
}