0

I am fairly new to Andriod developmenet. I am searching for a easy way to change the XML attributes as android:layout_marginStart, or android:layout_with. Something like (I know this will never be the right answer but I hope you know what I am searching for) (ImageView would be the Dd) ImageView.layout_marginStart = (the value). So is there a universal way to change the attributes in the MainActivity. And if there is no such way can someone please show me how I can change the marginStart value in less than four lines of code.

  • There are different ways to change the different attributes programmatically, and almost all of them have a way to change, actually, I just faced one case with `Chip` in the last years that can only be modified in xml. – Jagar Nov 01 '21 at 17:47

0 Answers0