我需要幫助。我試圖使用滑動從服務器獲取我的圖像,但我不知道如何?請構建我的代碼,以便Glide可以工作或給我任何其他可能的解決方案。我只想用Glide和JSON顯示圖像列表視圖,JSON結果來自我的PHP腳本。除了圖像以外,我能夠獲取其他數據。這是我的代碼。我應該放置滑翔的地方?滑動以在列表視圖中顯示圖像
public class list extends ListActivity {
private static final String TAG_POST= "posts";
private static final String TAG_ID="lecID";
private static final String TAG_NAME="lecName";
private static final String TAG_EMAIL="lecEmail";
private static final String TAG_PASS="lecPass";
private static final String TAG_IMAGE="image";
private static final String LECTURER_LIST_URL="http://system.com/list.php";
private JSONArray mComments =null;
private ArrayList<HashMap<String,String>> mcommentList;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.list_view);
ImageView imageView=(ImageView)findViewById(R.id.lec_Image);
//upload is the folder to store my image
String leciv="http://fypesystem.com/upload/";
Glide.with(this).load(leciv)
.thumbnail(0.5f)
.into(imageView);
您的幫助真的很感激。
你可以用添加您的問題JSON響應 –
不能加載文件夾URL到ImageView的 – Kuls