Apply image to button background
I wanted to apply image to background of button.
I written style for it as follows:
<style name="SingnupButton" parent="@android:style/TextAppearance.Medium">
<item android:drawable="@drawable/signupButton.jpeg" />
</style>
Image is in my drawable-hdpi folder.
I am applying it as follows:
<Button
style="@style/SingnupButton"
android:id="@+id/btn_register"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/btn_register" />
But this image is not getting applied to background of button.
What is wrong with my code?
Please guid me.
No comments:
Post a Comment