public TextView descriptionTextView(Context context, String text) {
final ViewGroup.LayoutParams lparams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
final TextView textView = new EditText(context);
textView.setLayoutParams(lparams);
textView.setTextSize(10);
textView.setTextColor(Color.rgb(0,0,0));
textView.setText(" " + text + "");
textView.setMaxEms(8);
textView.setKeyListener(null);
textView.setFocusableInTouchMode(false);
textView.setEnabled(false);
return textView;
}
Here is the code that I have written for the TextView
.
I would like to reference it from another classes, or within the same class, but I cannot find a way to pin it down; as in I would like to change the value based on an input.