Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove bottom padding of CardView #557

Open
candeiasdan opened this issue Jan 11, 2017 · 1 comment
Open

Remove bottom padding of CardView #557

candeiasdan opened this issue Jan 11, 2017 · 1 comment

Comments

@candeiasdan
Copy link

I have some weird bottom padding of CardView. I would like my card to fit my inner layout.

My card view layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/card_main_layout"
    style="@style/card.main_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:padding="8dp">

    <TextView
        android:id="@+id/operation"
        style="@style/settings_operation_title_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        tools:text="Rate this app" />

    <TextView
        android:id="@+id/description"
        style="@style/settings_operation_subtitle_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        tools:text="Rate this app" />
</LinearLayout>

Main Layout:

<ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <it.gmariotti.cardslib.library.view.CardView
            android:id="@+id/cardAbout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="12dp"
            android:layout_marginRight="12dp"
            android:layout_marginTop="12dp"/>

    </ScrollView>
@bytehala
Copy link

Have you tried specifying the left, right, and top padding on the card view layout? Maybe it's caused by android:padding="8dp" setting the padding on all 4 sides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants