Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对不同的标签使用不同的图像。但是图像不适合完全覆盖标签。如何使图像覆盖整个标签?
谢谢,索米亚
尝试在选项卡中放置一个 ImageView,设置为 match_parent:
imageView.setScaleType(ScaleType.FIT_XY);
或 XML:
android:scaleType="centerCrop";
要保持纵横比,请尝试:
setScaleType(ScaleType.CENTER_CROP);