gridview - Android rounded border color top-left only dinamically -


i need set dynamically gridview item, using linearlayout background drawable applying round corners can't figure out set top-left border color picture.... example

<img src="https://i.stack.imgur.com/r8lyh.png"/>

    <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"         android:id="@+id/gridview_item"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:background="@drawable/btn_rounded_white"         android:orientation="vertical">          <textview             android:id="@+id/gridview_text"             android:layout_width="match_parent"             android:layout_height="match_parent"             android:clickable="true"             android:text="@string/app_name"             android:textsize="@dimen/gridview_text"             android:textstyle="bold"             android:layout_gravity="center"             android:gravity="center">          </textview>      </linearlayout>   <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"     android:shape="rectangle" >     <solid android:color="@color/griditem_cat" />     <padding android:left="5dp"         android:top="5dp"         android:right="5dp"         android:bottom="5dp"/>     <corners android:bottomrightradius="7dp"         android:bottomleftradius="7dp"         android:topleftradius="7dp"         android:toprightradius="7dp"/> </shape> 

what this: setting relative layout , placing imageview drawable top left

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"         android:id="@+id/gridview_item"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:orientation="vertical">              <imageview                 android:layout_width="5dp"                 android:layout_height="5dp"                 android:layout_alignparentleft="true"                 android:layout_alignparenttop="true"                 android:src="@drawable/btn_rounded_white"                 />          <textview             android:id="@+id/gridview_text"             android:layout_width="match_parent"             android:layout_height="match_parent"             android:clickable="true"             android:text="@string/app_name"             android:textsize="@dimen/gridview_text"             android:textstyle="bold"             android:layout_centerinparent="true"             android:gravity="center">          </textview>      </relativelayout> 

Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -