質問編集履歴
4
画像 削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -130,8 +130,6 @@
|
|
130
130
|
|
131
131
|
|
132
132
|
|
133
|
-
![activity_main3_list.xml](1b057853cfb5c89a6263d76d6ced8124.png)
|
134
|
-
|
135
133
|
|
136
134
|
|
137
135
|
このスクショのようなrelativelayoutで作成したactivity_main3_list.xml(要素main_itemや要素right_item)
|
3
コードの変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -180,7 +180,7 @@
|
|
180
180
|
|
181
181
|
kensakuword = getIntent().getStringExtra("LIST_TIME");
|
182
182
|
|
183
|
-
//kensakuword(遷移元のputextraで渡された
|
183
|
+
//kensakuword(遷移元のputextraで渡された主キー)でsqlite内を検索
|
184
184
|
|
185
185
|
Cursor c = db.rawQuery("select Shopname,Foodname,Rating,Imagepath,Nitizi,Comment from Shops where Nitizi ='" + kensakuword + "'",null);
|
186
186
|
|
2
ソースコ^ド変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -180,7 +180,7 @@
|
|
180
180
|
|
181
181
|
kensakuword = getIntent().getStringExtra("LIST_TIME");
|
182
182
|
|
183
|
-
//kensakuword(遷移元のNitizi)でsqlite内を検索
|
183
|
+
//kensakuword(遷移元のputextraで渡されたNitizi)でsqlite内を検索
|
184
184
|
|
185
185
|
Cursor c = db.rawQuery("select Shopname,Foodname,Rating,Imagepath,Nitizi,Comment from Shops where Nitizi ='" + kensakuword + "'",null);
|
186
186
|
|
1
ソースコード追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -143,3 +143,51 @@
|
|
143
143
|
また、sqlite内に写真のパスを保存しているのですが、その写真のパスをsqliteから呼び出して、スクショ画像のカメラアイコンの下のimageviewに表示させるためにはどのような方法がありますか
|
144
144
|
|
145
145
|
ご回答よろしくお願いします
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
```java
|
150
|
+
|
151
|
+
public class Main3List extends AppCompatActivity {
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
public String kensakuword;
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
@Override
|
160
|
+
|
161
|
+
protected void onCreate(Bundle savedInstanceState) {
|
162
|
+
|
163
|
+
super.onCreate(savedInstanceState);
|
164
|
+
|
165
|
+
setContentView(R.layout.activity_main3_list);
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
MyOpenHelper helper = new MyOpenHelper(this);
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
SQLiteDatabase db = helper.getReadableDatabase();
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
kensakuword = getIntent().getStringExtra("LIST_TIME");
|
182
|
+
|
183
|
+
//kensakuword(遷移元のNitizi)でsqlite内を検索
|
184
|
+
|
185
|
+
Cursor c = db.rawQuery("select Shopname,Foodname,Rating,Imagepath,Nitizi,Comment from Shops where Nitizi ='" + kensakuword + "'",null);
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
}
|
190
|
+
|
191
|
+
}
|
192
|
+
|
193
|
+
```
|