如何让我的应用程序在任何地方都有相同的背景?我试图通过编辑主题来做到这一点,但问题是我的应用程序使用动画,当您转到新布局时,它会滑过。所以我想要的是一种在任何地方都有相同背景的方法,当新布局仅在 TextView 和按钮中滑动并且 sh*t 应该移动时。背景必须静止在同一位置。
此外,应用内背景的最佳尺寸是多少? 1080x1920 有点慢 :P
谢谢!!
我试过的:(values/styles.xml)
<resources>
<!-- Base application theme. -->
<style name="Theme.AppCompat.Light.NoActionBar.FullScreen" parent="@style/Theme.AppCompat.Light">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:background">@drawable/background</item>
</style>
(安卓 list )
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen" >
// unimportant things here
</application>
最佳答案
你可以在配置文件中设置你需要的背景。完成后,简单地确保您没有在其他任何地方设置背景,您应该没问题。
关于android - 如何在整个应用程序中保持相同的背景?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34137495/