Hi greg..Thanks for the reply.. Its working fine...
But I also have another doubt..
I m using a relative layout and I want to set alignParentBottom to
true..
We have a constructor like -- RelativeLayout.LayoutParams(Context c,
AttributeSet attrs) --...
Can u please tell me how to use attribute set?? or ne other method for
setting align parentbottom to true?

On Feb 17, 1:04 pm, Greg Krimer <[email protected]> wrote:
> See the section on Layout Params 
> here:http://developer.android.com/guide/topics/ui/declaring-layout.html
>
> I think you need to call setLayoutParams() on your image view and pass
> in an instance of the layout params that corresponds to the view group
> containing your image view. For example, if your image view is
> contained in a LinearLayout you would use LinearLayout.LayoutParams.
> Presumably the layout params you will use extend
> ViewGroup.MarginLayoutParams, allowing you to set the margins via the
> setMargins() method.
>
> On Feb 16, 10:59 pm, "sagar.indianic" <[email protected]>
> wrote:
>
> > Hello guys..This is urgent..can u plz help..
>
> > On Feb 16, 2:35 pm, Sagar Parmar <[email protected]> wrote:
>
> > > Hello every1,
>
> > > I want to set margin for an imageview through code. i coudnt find any 
> > > method
> > > for that .. XML attribute is android:layout_marginLeft..what is the java
> > > method ?? setPadding() does not work in my case.
> > > Please help its urgent..
>
> > > Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to