I got an XML file that includes a ConstraintLayout and inside this layout i got three views. The layout as its width set to "wrap_content" which automatically wrap it to the left side like this:
in the XML edit window, when i set layout_gravity to the right, it moves the layout to the right as expected:
I'm trying to achieve the same layout_gravity movement to right but programmatically (in Java) but i can not find any way to do it.