Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.app.Activity;

import android.text.TextUtils;

import android.widget.LinearLayout;
import android.widget.TextView;

public class Main {
    private static int textSize = 16;

    private static void addText(Activity activity, String text, LinearLayout layout, int maxWidth) {
        TextView textView = new TextView(activity);
        textView.setTextSize(textSize);
        textView.setMaxWidth(maxWidth);
        textView.setEllipsize(TextUtils.TruncateAt.END);
        textView.setText(text + "  ");
        layout.addView(textView);

    }
}