答案 0 :(得分:1)
android:tint
上有一个名为Imageview
的参数。
定义你的ImageView
这样的东西
<ImageView
android:id="@+id/hist_image"
android:layout_width="24dp"
android:layout_height="24dp"
android:tint="#colorcode"
android:layout_centerVertical="true"
android:layout_marginLeft="16dp"
android:src="@drawable/search_last" />
您也可以通过编程方式设置颜色。
imageView.setColorFilter(getResources().getColor(R.color.blue),
android.graphics.PorterDuff.Mode.MULTIPLY);
有关该内容的更多信息,请参阅this Documentation。我希望这将有所帮助。
快乐编码。