-
Notifications
You must be signed in to change notification settings - Fork 124
Open
Labels
Description
hi albert thanks for this very nice lib.
i use it in my app but in api 21 polygone shows black background or transparent even if have parent with colored background.
this is my code
PolygonImageView view = new PolygonImageView(getApplicationContext());
view.setImageResource(R.color.info_MainBackColor);
view.addBorderResource(5, R.color.info_MainBackColor);
view.setCornerRadius(2);
view.setVertices(6);
imageLayout.addView(view);
this is my layout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mainlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/amber_600"
RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mainlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/amber_600"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/imageLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp">
</RelativeLayout>
</LinearLayout>
