vinc3m1 / RoundedImageView

A fast ImageView that supports rounded corners, ovals, and circles.
Other
6.44k stars 1.25k forks source link

Setting border not working from xml and programaticall aswell #229

Closed ervinod closed 1 year ago

ervinod commented 5 years ago

Here is my code <RelativeLayout android:id="@+id/layout_opponent1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignParentTop="true">

                <com.makeramen.roundedimageview.RoundedImageView
                    android:id="@+id/ivOpponent"
                    android:layout_width="@dimen/dp40"
                    android:layout_height="@dimen/dp40"
                    android:layout_centerHorizontal="true"
                    android:scaleType="fitCenter"
                    android:background="@drawable/ic_user"
                    app:riv_border_color="#f2f0f0"
                    app:riv_border_width="@dimen/dp2"
                    app:riv_mutate_background="true"
                    app:riv_oval="true" />

                <TextView
                    android:id="@+id/tvOpponent"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/ivOpponent"
                    android:layout_centerHorizontal="true"
                    android:text="Opponent"
                    android:textColor="@color/white" />

            </RelativeLayout>