简体   繁体   中英

how i can delete extras margin in CardView inside RecyclerView

How can I delete this extras margin, I trying with this answers but not work.

在此处输入图片说明

My code CardView

< LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android"
xmlns: card_view = "http://schemas.android.com/apk/res-auto"
xmlns: tools = "http://schemas.android.com/tools"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content" >

 < android.support.v7.widget.CardView
android: id = "@+id/cartaExposicion"
android: layout_width = "wrap_content"
android: layout_height = "300dp"
card_view: cardPreventCornerOverlap = "false" >

 < ImageView
android: id = "@+id/imgExposicion"
android: layout_width = "wrap_content"
android: layout_height = "300dp"
android: src = "@mipmap/makuma_0salas" / >
 < /android.support.v7.widget.CardView> < /LinearLayout>

EDIT

I need delete the spacing into cardview

在此处输入图片说明

在此处输入图片说明

Try giving negative values for card view content padding

card_view:contentPadding="-5dp"

If you want to remove padding unevenly. Try giving different values for contentPaddingLeft, contentPaddingRight,contentPaddingBottom and contentPaddingTop.

Hope this will work for you.

I solved my problem, the size the images it's very big, i use image small and work fine.

Result

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM