I am trying to create a ImageButton for my user portrait.
<ImageButton
android:id="@+id/new_question_user_portrait"
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/oler_login_submit_button_bg"
android:src="@drawable/oler_portrait"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"/>
This is the background xml file.
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="10dp" />
</shape>
My src image is 200*200 px. Round Corner still not working for these code.
Could anyone show me the correct way to create a rounded Image Button with fixed height and width regardless of image source?