我創建了一個具有默認圖像的圖庫,當其中一個點擊並顯示在其他活動中時,但是我的問題是圖像加載時不佔用整個屏幕。不佔用整個ImageView中的圖像
這裏是XML的
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drag_activity_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".DragActivity" >
<ImageView
android:id="@+id/imageViewEdit"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/i1" />
</RelativeLayout>
和圖像加載到從活動這個ImageView的,使用下面的代碼。
Intent intent = getIntent();
int ImageId = intent.getIntExtra("drawableId", 0);
imgView = (ImageView) findViewById(R.id.imageViewEdit);
imgView.setImageResource(ImageId);
是他們其中的圖像佔據整個圖像視圖的方法。 專家請幫助我,是新來的android。提前致謝。