Android.Views.Textalignment is not working dynamically
I have tried the below code:
In load time:
CheckBox checkBox = new CheckBox(this);
checkBox.TextAlignment = Android.Views.TextAlignment.ViewStart;
Dynamically change the alignment in a button click. But alignment not updated.
checkBox.TextAlignment = Android.Views.TextAlignment.Center;
I assume that you want to change the alignment of the text in the
CheckBox. This can be achieved by setting the widget'sgravitytocenterin through code.