You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i want to change the code of MaterialList, so i can freely change the padding of between the cards;
i try this in two way, but both fail.
I want to use the public way setContentPadding() to change the padding of cardview,
but it don't work.
LayoutInflater inflater = getLayoutInflater();
CardLayout cardLayout = (CardLayout) inflater.inflate(R.layout.card_layout, null);
cardView = (CardView) cardLayout.findViewById(R.id.cardView);
if(cardView != null){
Log.v(TAG, "not null");
cardView.setContentPadding(0, 0, 0, 0);
}
I change the Constants in the styleable, but it will return to original value as soon as i run the project
public static final int CardView_contentPadding = 8;
public static final int CardView_contentPaddingBottom = 12;
public static final int CardView_contentPaddingLeft = 9;
public static final int CardView_contentPaddingRight = 10;
public static final int CardView_contentPaddingTop = 11;
The text was updated successfully, but these errors were encountered:
i want to change the code of MaterialList, so i can freely change the padding of between the cards;
i try this in two way, but both fail.
I want to use the public way setContentPadding() to change the padding of cardview,
but it don't work.
LayoutInflater inflater = getLayoutInflater();
CardLayout cardLayout = (CardLayout) inflater.inflate(R.layout.card_layout, null);
cardView = (CardView) cardLayout.findViewById(R.id.cardView);
if(cardView != null){
Log.v(TAG, "not null");
cardView.setContentPadding(0, 0, 0, 0);
}
I change the Constants in the styleable, but it will return to original value as soon as i run the project
The text was updated successfully, but these errors were encountered: