java 代码中 实现:
Button.setBackgroundColor(Color.parseColor("#00000000"));
xml中 实现(为Button添加该属性):
android:background="@android:color/transparent"
实例:
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="20dp">
<ImageView
android:src="@mipmap/user"
android:layout_height="170dp"/>