Code example for TextView

Methods: setPaddingsetTextsetTextColorsetTypeface

0
		nameTextView.setTypeface(null, Typeface.BOLD);
		controlLayout.addView(nameTextView);
		 
		//TODO: Move this to xml 
		//Control description 
		descriptionTextView = new TextView(context);
		descriptionTextView.setPadding(15, 5, 0, 0);
		//-- descriptionTextView.setBackgroundColor(Color.BLACK); 
		//descriptionTextView.setTextSize(nameTextView.getTextSize()*0.5f); 
		descriptionTextView.setTypeface(Typeface.defaultFromStyle(Typeface.ITALIC), Typeface.ITALIC);
		descriptionTextView.setTextColor(Color.LTGRAY);
		descriptionTextView.setText(description);
		controlLayout.addView(descriptionTextView);
		 
		createInternal(); 
		 
		TextView paneSeparatorBlank = new TextView(context);
		paneSeparatorBlank.setHeight(5);
        //--paneSeparatorBlank.setBackgroundColor(Color.BLACK); 
        paneSeparatorBlank.setText("");
Stop searching for code, let great code find you!  Add Codota to your java IDE