如果我使用重力fill_vertical或如何我可以保持纵横比fill_horizontal?在这段代码中:
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/_toogle_green"
android:gravity="bottom|fill_vertical"
/>
Run Code Online (Sandbox Code Playgroud)
位图填充垂直,但在水平方向保持原始宽度和宽高比被打破.
我相信这个问题被问到了,但我真的找不到它,只针对ImageView或ImageButton.但我需要在drawables中做到这一点.
| 归档时间: |
|
| 查看次数: |
2780 次 |
| 最近记录: |