I want to use this code to change the alignment of my textView in the layout programmatically.
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?