android - Imageview over card border - how to solve it? -
i'm making app google now-like interface, cards content.
first please take @ image: http://imgur.com/olssvin
i managed create card , add contents imageview getting on top of card border (the shadow line) blue arrow indicates.
please how can make card gray border star under imageview? tried adding margin imageview , bottom/top padding card without success.
heres code card bg:
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle" android:dither="true"> <corners android:radius="0dp"/> <solid android:color="#bdbdbd" /> </shape> </item> <item android:bottom="2dp"> <shape android:shape="rectangle" android:dither="true"> <corners android:radius="0dp" /> <solid android:color="@android:color/white" /> </shape> </item> </layer-list>
and activity contents:
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginbottom="4dp" android:layout_marginleft="6dp" android:layout_marginright="6dp" android:layout_margintop="4dp" android:background="@drawable/friend_card_profile_bg" > <imageview android:id="@+id/friendpic" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginbottom="1dp" android:adjustviewbounds="true" android:scaletype="fitxy" android:src="@drawable/friend_testpic" /> <textview android:id="@+id/friendusername" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginbottom="2dp" android:layout_marginleft="6dp" android:layout_margintop="4dp" android:layout_torightof="@+id/friendpic" android:fontfamily="sans-serif-condensed" android:text="@string/profile_username" android:textcolor="#7f7f7f" android:textsize="19dp" /> <textview android:id="@+id/friendlinkscounter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/friendusername" android:layout_marginleft="6dp" android:layout_torightof="@+id/friendpic" android:fontfamily="sans-serif" android:text="@string/profile_links_counter" android:textcolor="#acacac" android:textsize="14dp" /> <textview android:id="@+id/friendfriendscounter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/friendlinkscounter" android:layout_marginleft="6dp" android:layout_torightof="@+id/friendpic" android:fontfamily="sans-serif" android:text="@string/profile_friends_counter" android:textcolor="#acacac" android:textsize="14dp" /> </relativelayout>
thanks you
try using 2dp padding on bottom of relative layout, should adjust contents it's above shadow.
Comments
Post a Comment