Code example for TextView

Methods: getBottomappend

0
        @Override 
        protected void onProgressUpdate(String... values) {
            final String line = values[0];
            final boolean isAtBottom = scrollView.isAtBottom();
            if (!TextUtils.isEmpty(line)) {
                logView.append(Html.fromHtml("<font color=\"" + color(line) + "\">" + line + "</font><br/>"));
                if (isAtBottom) {
                    scrollView.scrollTo(0, logView.getBottom());
                } 
            } 
        } 
 
        private String color(String line) {
            switch (line.charAt(0)) {
                case 'E': 
                    return "red"; 
                case 'W': 
                    return "#FFA500"; 
                case 'D': 
                    return "blue"; 
                default: