Issue
I have a View with a background of a circle drawable. I want the circle to be larger than it's containing view, but still clipped off. The problem is, the drawable size doesn't want to go beyond the view's size, and the whole circle is much smaller than I need it to be.
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="60dp">
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_alignParentRight="true"
android:background="@drawable/circle" />
</RelativeLayout>
And the circle.xml:
<shape android:shape="oval">
<solid android:color="#ff0000" />
</shape>
How can I get the get the large cropped circle instead?
Solution
<shape android:shape="oval">
<size android:width="50dp" android:height="50dp" />
<solid android:color="#ff0000" />
</shape>
If problem still exists, you may need to use ImageView and setImageResource instead of view and backgrounds.
Answered By - Emre Aktürk
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.