2017-04-11 35 views
-3

我執行我的應用程序加載屏幕,我跟着這個教程: https://www.bignerdranch.com/blog/splash-screens-the-right-way/無法形成規模PNG到Android應用程序閃屏

很酷,很簡單,但顯示的加載屏幕時,PNG圖像我使用的是非常放大的,因爲我沒有縮放它。我的問題是,我該怎麼做? 這裏是繪製的xml:

<?xml version="1.0" encoding="utf-8"?> 
 
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> 
 

 
    <item 
 
     android:drawable="@color/white"/> 
 

 
    <item> 
 
     <bitmap 
 
      android:src="@drawable/loading" 
 
      /> 
 
    </item> 
 

 
</layer-list>

+0

您可以將裝載繪製的圖像,以及它是什麼樣子的設備上的屏幕截圖? – Pythogen

回答

0

試試這個:

<item android:width="100dp" 
     android:height="100dp"> 
     <bitmap 
      android:src="@drawable/loading"/> 
</item> 
相關問題