I want to make a button like this by a compound view!
I am following this tutorial, but I am not able to make a view like this.
Can anybody show me some direction?
I want to make a button like this by a compound view!
I am following this tutorial, but I am not able to make a view like this.
Can anybody show me some direction?
try this
<FrameLayout
android:layout_width="210dp"
android:layout_height="210dp"
//set framelayout clickable
><Button
android:id="@+id/filter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="7dp"
android:background="#0000FF"
android:gravity="center"
android:paddingBottom="25dp"
android:paddingTop="25dp"
android:text="Sort"
android:textColor="#FFFFFF" />
<ImageView
android:id="@+id/widget_title_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right"
android:adjustViewBounds="true"
android:paddingTop="-10dp"
android:scaleType="fitStart"
android:src="@drawable/checkbtn" />
</FrameLayout>
play around with this : android:paddingTop="-10dp"
this is what it will look like somewhat : here is