简体   繁体   English

我如何在RecyclerView中删除CardView中的额外保证金

[英]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 我的代码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 我需要在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. 尝试为contentPaddingLeft,contentPaddingRight,contentPaddingBottom和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 结果

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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