A PNG image is to be used as the icon foreground, and the background should be completely transparent.
Using Android Studio > New Image Asset > Configure
First you have a background image to get transparent icon without any background image you can't get your icon transparent .
And if you look to get image transparent you simply use some photo editor.
Method 1:
if you have a png, just copy it and paste it in drawable, and refer to image name from manifest.
<application
android:allowBackup="true"
android:icon="@mipmap/new_image"
android:label="@string/app_name"
android:roundIcon="@mipmap/new_image"
android:supportsRtl="true"
android:theme="@style/AppTheme">
....
</application>
Method 2:
Goto file > new > image asset, make sure you select a png image (with transparent background) & set background shape to none.
Get a view of the imageButton
View v = findViewById(R.id.myImageBtn);
get the icon from the app for example Chrome
pkgnam="com.android.chrome";
Intent intent1 = ctx.getPackageManager().getLaunchIntentForPackage(pgknam);
Drawable myIcon = getPackageManager().getActivityIcon(intent1);
set the background icon the same as the foreground icon
v.setForeground(myIcon);
v.setBackground(myIcon);