Question: I'm looking for a way to dynamically change an elements properties. 

For example I want the user of my app to be able to enter a value within my program that will change android:layout\_marginTop="blabla" to whatever I want. It doesn't specifically have to be that property, I want to be able to change any property of any element. Is there a way to do this?

Answer: 
Depends which kind of property you are willing to change.
For some you have methods in the `View` object and for other using `LayoutParameters`.

You can check the following questions which answers similar stuff:

* [Set margins in a LinearLayout programmatically](https://stackoverflow.com/questions/2481455/set-margins-in-a-linearlayout-programmatically)
* [How to set margin of ImageView using code, not xml](https://stackoverflow.com/questions/3416087/how-to-set-margin-of-imageview-using-code-not-xml)
You can use this way by defining layout params and define it in your view.

```
    LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
            LayoutParams.WRAP_CONTENT);
    lp.setMargins(30, 0, 0, 0);

    lp.height = "100";
    lp.width = "100";
    button.setLayoutParams(lp);

```