I have a custom view (an extension of a TextView) that I want to dynamically add to my Layout (don\'t want to include it in the main.xml file).
The book says to fetc
Please post your code where you add the view. But yes, you might be missing the params for width and height. Try something like
LayoutParams p = new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.FILL_PARENT);
txtView.setLayoutParams(p);
or what you would like the width and height to be. Also in xml layout, layout_width and layout_height are required attributes.