I design my button in round shape by using this below code and then i want to show some text on button so i used Frame Layout and then i put some text on my button. Now the Challange is that my button is still.it doesnot show any effect on click where the drawable and src both are used one for roundshape button and other for image on button (respectivitly).
Now my button doesnot make any effect on design on click how i make that effect.
<FrameLayout>
<ImageButton
android:id="@+id/btn_profile_view"
android:layout_width="70dp"
android:layout_height="67dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="20dp"
android:layout_weight="1"
android:onClick="compareButtonClick"
android:background="@drawable/roundedbutton"
android:src="@drawable/ic_action_person" />
<TextView
android:layout_width="45dp"
android:layout_height="20dp"
android:layout_gravity="bottom"
android:layout_marginLeft="38dp"
android:clickable="false"
android:text="@string/profile"
android:textColor="@color/btn_txt" >
</TextView>
</FrameLayout>
<shape xmlns:android="http://ift.tt/nIICcg"
android:shape="rectangle" >
<solid android:color="#D3D3D3" />
<corners
android:bottomLeftRadius="8dip"
android:bottomRightRadius="8dip"
android:topLeftRadius="8dip"
android:topRightRadius="8dip" />
Aucun commentaire:
Enregistrer un commentaire