I have an ImageView and need to set the indent from below.
I do like this
ivRedPoint = (ImageView) findViewById(R.id.rlRedPoint); LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); lp.setMargins(25, 12, 32, 21); ivRedPoint.setLayoutParams(lp); Here is the XML
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" > <ImageView android:id="@+id/rlRedPoint" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/style_red_point" android:gravity="center" android:visibility="invisible" /> </LinearLayout> This ImageView does not respond to any indents ...
What am I doing wrong?