Zor*_*gan 5 xml android android-drawable
这是我的启动画面:
启动画面.xml
<item android:drawable="@color/colorBackground"/>
<item android:width="50dp" android:height="50dp" android:gravity="center">
<bitmap
android:src="@drawable/truthordare_splash"
android:gravity="center" />
</item>
Run Code Online (Sandbox Code Playgroud)
样式.xml
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:fontFamily">@font/play</item>
<item name="android:windowBackground">@drawable/splash_screen</item>
</style>
Run Code Online (Sandbox Code Playgroud)
位图图像几乎占据了整个屏幕。我想减小它的大小,但是更改父级的width和没有任何作用。为什么是这样?height<item>
PS:这truthordare_splash是根据屏幕密度的动态图像:

如何更改位图的大小?
| 归档时间: |
|
| 查看次数: |
1050 次 |
| 最近记录: |