Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove MaterialCardView borders

I'm using this layout

<android.support.design.card.MaterialCardView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerInParent="true"
    android:innerRadius="0dp"
    android:shape="ring"
    android:thicknessRatio="0"
    app:cardCornerRadius="24dp"
    card_view:cardElevation="0dp"
    card_view:cardMaxElevation="0dp">
  <ImageView
      android:id="@+id/close_button"
      android:layout_width="48dp"
      android:layout_height="48dp"
      android:layout_gravity="top|end"
      android:padding="@dimen/account_menu_close_button_padding"
      android:alpha="0"
      app:srcCompat="@drawable/quantum_gm_ic_close_vd_theme_24"
      />
</android.support.design.card.MaterialCardView>

but I get a cardView with tiny border

enter image description here

How can I remove this border and make the cardview transparent?

I saw this similar post, but it gives no answer

like image 541
Elad Benda Avatar asked May 30 '19 14:05

Elad Benda


People also ask

How do I remove a layout border?

Go to Design > Page Borders. In the Borders and Shading box, on the Page Border tab, select the arrow next to Apply to and choose the page (or pages) you want to remove the border from. Under Setting, select None, and then select OK.

What is MaterialCardView?

MaterialCardView is a customizable component based on CardView from the Android Support Library. MaterialCardView provides all of the features of CardView, but adds attributes for customizing the stroke and uses an updated Material style by default.


1 Answers

Have you used these,

app:strokeColor
app:strokeWidth
like image 145
notTdar Avatar answered Sep 21 '22 18:09

notTdar