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

ChatMessageView with no content padding not rounding borders #7

Open
MrBrightside29 opened this issue Nov 24, 2015 · 0 comments
Open

Comments

@MrBrightside29
Copy link

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

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

1 participant