XML : Imageview drawable layer in specified width

I want black semi transparent background through the entire center of the image. Currently im getting it only for Check box background ,i need it from the background image view start to end.

My code is:

enter image description here

  <ImageView android:id="@+id/image_view"          android:layout_width="wrap_content"                  android:background="@color/black_semi_transparent"          android:layout_height="wrap_content"          android:layout_marginTop="65dp"          android:adjustViewBounds="true"          android:maxHeight="190dp"          android:scaleType="fitCenter"          android:layout_marginLeft="40dp"          android:src="@drawable/bgsignup_14"          />          <CheckBox          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:text="HEALTHY, LASTING WEIGHT LOSS"          android:id="@+id/checkBox"          android:layout_marginTop="145dp"          android:layout_gravity="center_horizontal"          android:textColor="@color/white"          android:buttonTint="@color/yellow"          android:background="@color/black_semi_transparent"          android:layout_alignParentRight="true"          android:checked="false" />    

No comments:

Post a Comment