In GridView, I am showing grid of books. Each book has status - new, favorite, done. This is example, what I want to implement:
My layout has 2 ImageViews: 1 for book cover and 1 for book status icon(new, done, favorite)
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/ivCover"
android:layout_width="95dp"
android:layout_height="146dp"
/>
<ImageView
android:layout_width="26dp"
android:layout_height="26dp"
android:src="@drawable/icon_new"
android:layout_alignParentTop="@id/ivCover"
android:layout_alignRight="@id/ivCover"
android:background="@drawable/shape_round_book_status"
android:layout_marginRight="-13dp"
android:layout_marginTop="-13dp"/>
</RelativeLayout>
I found how to position one view's center on another view's top right corner here. In that example, solution was for one item - linear layout. In my case, I am putting status icon on the corner for grid view item. In result, most of status icon not visible:
How to make one view's center on another view's top right corner inside list item layout?