[android-beginners] API setMargins() not working

2009-11-18 Thread Nithin
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,

Re: [android-beginners] API setMargins() not working

2009-11-18 Thread Justin Anderson
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.