I have set align_center_horizontal as true in my layout xml . but sometimes I do want to set as false . I found that there is no FALSE variable as such defined in RelativeLayout so that I can make it false at runtime
If it is possible to achieve how ?
assuming its not possible I created a new RelativeLayout.LayoutParams as below
if (digitPadVisible == false) {
RelativeLayout.LayoutParams params1 = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
String stringDimensions = getResources().getString(
R.dimen.active_call_options_margin_bottom);
params1.bottomMargin = Integer.parseInt(stringDimensions
}else{
...
...
}
but the effect of making this change is not visible when digitPadVisible is false , instead it is visible in the digitPadVisible true case
I think applying LayoutParams is not taking immediate effect how can I solve this