Skip to content

ChatMessageView with no content padding not rounding borders #7

@MrBrightside29

Description

@MrBrightside29

When setting the content_padding xml property to 0dp the view does not round the corners.
In my case I'm using the ChatMessageView to show an ImageView and I'd like to not show any background around the ImageView. Here is my xml:

<me.himanshusoni.chatmessageview.ChatMessageView xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cmv_arrowGravity="start"
        app:cmv_arrowMargin="3dp"
        app:cmv_arrowPosition="right"
        app:cmv_backgroundColor="@color/md_grey_300"
        app:cmv_backgroundColorPressed="@color/md_pink_50"
        app:cmv_contentPadding="0dp"
        app:cmv_cornerRadius="3dp"
        app:cmv_showArrow="true">

        <FrameLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"            
            android:orientation="vertical">

            <ImageView
                android:id="@+id/imageView"
                android:layout_width="200dp"
                android:layout_height="180dp"
                android:adjustViewBounds="true"
                android:scaleType="centerCrop" />

            <TextView
                android:id="@+id/tVtimestamp"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom|end"
                android:fontFamily="sans-serif"
                android:padding="4dp"
                android:text="14:30"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textColor="@color/md_white_1000"
                android:textSize="12sp"
                android:shadowColor="#8000"
                android:shadowDx="0"
                android:shadowDy="2"
                android:shadowRadius="2"/>

        </FrameLayout>
    </me.himanshusoni.chatmessageview.ChatMessageView>

And this is what shows in app:

screenshot_20151124-142937

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions