我想缩放图像,但我无法得到,我正在i.getStringExtra("image");
获取图片网址链接....我该怎么办?此代码成功显示图片但没有放大/在图像工作..
1)的 SingleItemView.java
public class SingleItemView extends Activity {
ImageLoader imageLoader = AppController.getInstance().getImageLoader();
private static String TAG;
ImageView_Main itemImage;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Get the view from singlelistview.xml
setContentView(R.layout.singlelistview);
try {
Intent i = getIntent();
String image = i.getStringExtra("image");
// Zoom the image
NetworkImageView itemImage = (NetworkImageView) findViewById(R.id.itemImage);
itemImage.setImageUrl(image, imageLoader);
} catch (Exception e) {
Log.i(TAG, e.getMessage());
}
}
2)的 singlelistview.xml
<com.android.volley.toolbox.NetworkImageView
android:id="@+id/itemImage"
android:layout_width="fill_parent"
android:layout_height="370dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/g"
android:background="@drawable/border"
android:scaleType="fitXY" />