How can I set the top padding of a ListView programmatically? With SetPadding() nothing happens with the listView while doing it in axml with android:paddingTop="100dp" works great.
In other words; how can I implement android:paddingTop="100dp" in code?
Why I need it?: I need the padding for design/interaction reasons and it works great if I set it in axml. But the size/value needs to be the exact same size of another view (because of design/interaction reasons) I need to set it in code. And I discovered the ListView.paddingTop property in the background sets the ListPaddingTop of the ListView, I tried looking for the answer in there but I couldn’t find any solution for setting that property either.
I currently use this axml setup:
<ListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="100dp"
android:scrollbarStyle="outsideOverlay"
android:clipToPadding="false" />