Forum Xamarin.Android

Changing the alignment of a TextView using LayoutParams Not working!

hi
I want to use this code to change the allignment of my textView in the layout programatically.
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)textView1.getLayoutParams();
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
textView1.setLayoutParams(params);
But When I try it RelativeLayout doesn't have ALIGN_PARENT_RIGHT or generaly Align_...
what should I do?! <<<minSdkVersion="8" android:targetSdkVersion="18">>>
Thanks

Sign In or Register to comment.