我使用位图作为 Activity 背景。自定义背景的代码为:
<item>
<bitmap android:src="@drawable/fog"
android:layout_width="match_parent"
android:adjustViewBounds="true"
/>
</item>
但是它位于中间并且不占据整个屏幕空间。 我怎样才能让它填满所有可用空间? 我尝试将宽度和高度设置为 fill_parent。
谢谢
最佳答案
尝试添加:
android:layout_width="match_parent"
android:layout_height="match_parent"
关于Android:拉伸(stretch)位图以填充整个屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14013000/