2014-02-06 34 views
2

想要讓空間背景,我的活動,並開始緩慢地旋轉,但我堅持認爲: screenshot (http://postimg.org/)如何讓背景變大然後旋轉屏幕?

我需要need如果在XML文件中添加我能得到的效果

android:scaleY="2" 
android:scaleX="2" 

但它不會工作,android應用程序啓動時縮小圖片。

傢伙,真的需要你的幫助,我在Android的4天,有英語不好

---- ---的新增

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 


    <ImageView android:id="@+id/image" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:src="@drawable/backgroundd" 
     android:layout_centerHorizontal="true" 
     android:layout_centerVertical="true"/> 

</RelativeLayout> 
+0

發佈您到目前爲止所嘗試的內容。我會建議在'RelativeLayout'中使用圖像並應用遞歸動畫。 – cosmincalistru

+0

你可以更詳細地瞭解遞歸動畫嗎? – Arcaniel

+0

This(http://stackoverflow.com/q/18016126/1369566)可能會有所幫助。 – cosmincalistru

回答

1

我沒試過,我不肯定這是最好的解決方案,但你可以設置一個負的android:layout_marginon圖像?

android:layout_margin="-100dp" 

在這裏看到更多:How to get a view larger than its parent?

此外,發佈您的完整的XML可以幫助我們更多地瞭解你是如何設置的佈局。

+0

剛剛嘗試過,但沒有奏效。 – Arcaniel