回答編集履歴
1
追加
test
CHANGED
@@ -261,3 +261,25 @@
|
|
261
261
|

|
262
262
|
最後までスクロール時
|
263
263
|

|
264
|
+
|
265
|
+
---
|
266
|
+
なお、 ListView の代わりに自分で View を管理出来れば、
|
267
|
+
```xml
|
268
|
+
<LinearLayout
|
269
|
+
android:id="@+id/rows"
|
270
|
+
android:layout_width="match_parent"
|
271
|
+
android:layout_height="wrap_content"
|
272
|
+
android:orientation="vertical" />
|
273
|
+
```
|
274
|
+
というレイアウトに対して
|
275
|
+
```java
|
276
|
+
LinearLayout rows = findViewById(R.id.rows);
|
277
|
+
for(int i = 1; i <= 20; i++) {
|
278
|
+
View view = LayoutInflater.from(this).inflate(R.layout.row, rows, false);
|
279
|
+
((TextView)view.findViewById(R.id.text1)).setText("かきくけこ" + i);
|
280
|
+
((TextView)view.findViewById(R.id.text2)).setText("さしすせそ" + i);
|
281
|
+
((TextView)view.findViewById(R.id.value)).setText("" + (100 + i));
|
282
|
+
rows.addView(view, new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT));
|
283
|
+
}
|
284
|
+
```
|
285
|
+
というコードで行を並べたような状態に出来ます。
|