Java tutorial
//package com.java2s; //License from project: Open Source License import android.app.Activity; import android.widget.LinearLayout; import android.widget.TextView; public class Main { private static int textSize = 16; private static void addCount(Activity activity, Integer count, LinearLayout layout, String label) { if (count != null && count > 0) { TextView amt = new TextView(activity); amt.setTextSize(textSize); amt.setText(count.toString() + " " + label + " "); layout.addView(amt); } } }