ImageView的仿真器上显示是但在实际的设备不在,我从以下androidhiveImageView的实际设备没有显示
myjava.java
url_get_photo = "http://www.myurl.com/"
String key = getIntent().getStringExtra("key");
int loader = R.drawable.photo_blank;
ImageView image = (ImageView) findViewById(R.id.img_photo);
String image_url = (url_get_photo + key + ".jpg");
ImageLoader imgLoader = new ImageLoader(getApplicationContext());
imgLoader.DisplayImage(image_url, loader, image);
myactivity.xml教程
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent">
<ImageView
android:id="@+id/img_photo"
android:layout_width="150dp"
android:layout_height="150dp" />
.......
我不知道为什么。出了什么问题?提前致谢。
什么是url_get_photo和柯的价值? –
那么我会首先检查'image_url'是否合法。你从哪里得到它? – M090009
@AawazGyawali'url_get_photo' = http.www.myurl.com/和'ke'作为EditText的关键输入 – Gsurha