Android圆形边框颜色仅左上角

Android圆形边框颜色仅左上角,android,gridview,layout,rounded-corners,border-layout,Android,Gridview,Layout,Rounded Corners,Border Layout,我需要动态设置一个GridView项,我正在使用LinearLayout和背景可绘制应用圆角,但我无法确定只设置左上角的边框颜色,如下图所示。。。。 grid\u item.xml <RelativeLayout android:id="@+id/gridview_item" android:layout_width="match_parent" android:layout_height="match_parent"> <PinnedGridItemVie

我需要动态设置一个GridView项,我正在使用LinearLayout和背景可绘制应用圆角,但我无法确定只设置左上角的边框颜色,如下图所示。。。。


grid\u item.xml

<RelativeLayout 
android:id="@+id/gridview_item" 
android:layout_width="match_parent" 
android:layout_height="match_parent">
     <PinnedGridItemView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content"/>
    <TextView android:id="@+id/gridview_text">
     </TextView>
</RelativeLayout>

您想动态设置左上角的颜色,还是只设置这四种颜色?@Aditya Vyas Lakhan它需要使用十六进制颜色动态着色,我尝试使用三角形自定义视图,但我丢失了圆形的左上角,如图像示例attachedif Dynamic,您需要在“三角形”上调用
Drawable#setColorFilter
drawable@pskink我将尝试设置三角形颜色…正如我所说的,使用三角形我可以设置自定义视图的颜色(),但我没有找到如何使其在左上角圆角``
pin = (PinnedGridItemView) relativeLayout.findViewById(R.id.pinned_grid_item);
pin.setColorCode(Color.RED);// Here I set any color that I want dynamically, the problem now is to solve top-left rounded corner