こんにちは私はリストビューに画像を追加したいと思っています。 どうすればいいですか? XMLコード List.xmlのリストビューに画像を追加する方法
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/nom"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/email2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
Javaコード
私はコメントでコードを使用しようとしましたが、それは
private void showEmployee(String json){
try {
JSONArray result = new JSONArray(json);
JSONObject c = result.getJSONObject(0);
String ref = c.getString("Reference");
String loginr = c.getString("Login");
String prix = c.getString("Prix");
String quantite = c.getString("Quantite");
String prixT = c.getString("PrixT");
String dateCom = c.getString("DateCom");
editRef.setText(ref);
editLogin.setText(loginr);
editprixu.setText(prix);
editQt.setText(quantite);
editprix.setText(prixT);
editdate.setText(dateCom);}
キャッチ(JSONException電子){ Eは動作しません。 .printStackTrace();}
ありがとうございました
あなたはAndroidの開発に関する知識は少なくとも取得する必要があります。 –