私はアンドロイドが初めてです..ListView行にテキストを含むビデオのサムネイルを表示するにはどうすればよいですか?
データベース(サーバー)に一連のYouTube URLを保存しました。AsyncTask を使用して、URL を取得し、配列文字列に格納しました... onPostExecute メソッドで..この配列のビデオ URL をテキスト付きのリスト ビューで表示するには??
これを実装する方法は??
class LoadFiles extends AsyncTask<String, String, String> {
@Override
protected void onPreExecute() {
super.onPreExecute();
pDialog = new ProgressDialog(Focusarea.this);
pDialog.setMessage("Loading Videos. Please wait...");
pDialog.setIndeterminate(false);
pDialog.setCancelable(false);
pDialog.show();
}
protected String doInBackground(String... args) {
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("name", name));
json = jsonParser.makeHttpRequest(url_geturl, "GET", params);
Log.d("All Groups: ", json.toString());
try {
int success = json.getInt(TAG_SUCCESS);
System.out.println("Success");
if (success == 1) {
System.out.println("Success");
groups = json.getJSONArray(TAG_GROUP);
System.out.println("Result Success+++"+groups);
for (int i = 0; i < groups.length(); i++) {
JSONObject c = groups.getJSONObject(i);
String intro = c.getString(TAG_INTRO);
System.out.println("Checking ::"+intro);
vid.add(intro);
System.out.println("VIDEOS LINK" + vid);
if(intro!=null && intro!=""){
videoUrl=intro;
}else {
showAlert();
}
} catch (JSONException e) {
System.out.println("Error "+e.toString());
}
return null;
}
protected void onPostExecute(String file_url) {
// dismiss the dialog after getting VIDEOS
pDialog.dismiss();
vid=new ArrayList<String>(new ArrayList<String>(vid));
// how to implement here...
}
}