1.theme
老實(shí)說(shuō)我適配過(guò)好多次啟動(dòng)頁(yè),代碼都丟失了,哈哈哈,每次都費(fèi)老大勁,有的是laylist
有的是.9圖片,這回我要說(shuō)的是.9圖片,不能說(shuō)百分百適配啊 分辨率越高越明顯 只能保證圖標(biāo)不變形 在我看來(lái),適配99%
分辨率吧.
<style name="AppTheme.Launcher" parent="Theme.AppCompat.NoActionBar">
<!-- <item name="android:windowBackground">@drawable/layer_splash</item>-->
<!-- <item name="android:windowBackground">@drawable/psjs</item>-->
<item name="android:windowBackground">@drawable/psjs100</item>// .9圖片
<item name="windowNoTitle">true</item>
<!-- <item name="android:windowFullscreen">true</item>-->
<!-- <item name="android:windowDisablePreview">true</item>-->
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
<item name="colorPrimary">@color/color_3FB33D</item>
<item name="colorPrimaryDark">@color/color_3FB33D</item>
<item name="colorAccent">@color/color_3FB33D</item>
<item name="android:windowAnimationStyle">@style/AnimaActivity</item><!--activity進(jìn)出動(dòng)畫(huà)-->
</style>
啟動(dòng)頁(yè)配置
<activity
android:name="....."
android:theme="@style/AppTheme.Launcher">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
2.圖片,需要注意的是 .9圖片制作 什么地方需要保留,什么地方需要拉滿(mǎn),這個(gè)有講究,左上,右上角都拉點(diǎn)別忘了,圖片我拉的線太小看的不真切,大概是這樣意思 關(guān)于圖片大小 我是用1080*1920 放在xxhdpi下

sps.9.png
3.重要的一點(diǎn),如果集成今日頭條適配方案 請(qǐng)取消該activity的適配,否則會(huì)出現(xiàn)圖片抖動(dòng)