Hi,
I am trying to give margin for Textview, using MarginLayoutParams and
setMargins(), But its not working
The way I am trying is,
LinearLayout layout = new LinearLayout(this);
LayoutParams layoutParams = new LayoutParams(
LinearLayout.LayoutParams.FILL_PARENT,
I've never done layout-type stuff programmatically. I've always done it via
XML.
However, I noticed that TextView has a setPadding method. I know it isn't
exactly the same thing as the margin, but in a lot of cases you can get the
desired look using either.
2 matches
Mail list logo