I want to make a screen which contains a top bar and an image. I use TextView for the top bar and ImageView for the image. I want to set padding only to the image view. My xml i
You should use layout_margin
instead of padding
so it should be as following:
and you can specify 1 layout_margin
for all directions so instead of using
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
you can use:
android:layout_margin="10dip"
hope this is what you are looking for. give me a feedback otherwise ;)
update
you can set cropToPadding also: