Skip to content

showing black background in api 21 #4

@mohamadk

Description

@mohamadk

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.

device-2015-12-02-110924

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions