1
我正在嘗試爲我的應用程序創建啓動畫面,但圖像不斷剪裁到屏幕中央的正方形。 Eclipse中「圖形佈局」選項卡中的屏幕模型看起來不錯,但是當我在模擬器或手機上測試它時,圖像被裁剪/裁剪爲屏幕中央的正方形。如何防止imageview中的圖像被裁剪爲正方形?
模擬器的屏幕截圖可用here。
這個代碼是:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/digitalorange" />
</LinearLayout>
您正在開發哪個Android版本和API級別? –
是你在活動xml中擁有的所有代碼嗎?您是否嘗試將ImageView放入RelativeLayout或FrameLayout中以縮小問題空間? –
我試過相對和框架,但沒有幫助。我在2.3.3工作(我認爲是10級)。這就是splashscreen.xml中的所有代碼。 – mikeagoff