-3
A
回答
0
4
使用的例子一個簡單的例子:
public class MainActivity extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
TableRow.LayoutParams params = new TableRow.LayoutParams(100, 100);
TableLayout table = new TableLayout(this);
for (int i = 0; i < 3; i++) {
TableRow row = new TableRow(this);
for (int j = 0; j < 3; j++) {
TextView text = new TextView(this);
text.setLayoutParams(params);
text.setText(String.format("(%d, %d)", i, j));
row.addView(text);
}
table.addView(row);
}
setContentView(table);
}
}
如果你能擺脫它,GridView和ListView可以更容易使用適配器,例如ArrayAdapter工作和CursorAdapter。
2
相關問題
- 1. 泰伯維每次
- 2. 調用泰伯維
- 3. 泰伯維:添加陰影
- 4. 實時泰伯維變化
- 5. iOS版 - 泰伯維渲染
- 6. 泰伯維頭問題
- 7. Spritekit - Spritenode在泰伯維
- 8. 無法顯示泰伯維
- 9. 泰伯維用2段
- 10. 連接到泰伯維
- 11. 麻煩與泰伯維
- 12. 泰伯維button.tag擲LLDB
- 13. 的registerClass錯誤泰伯維
- 14. 泰伯維細胞字幕
- 15. 組合框在泰伯維
- 16. 泰伯維應用從SQLite數據庫
- 17. 將數據載入泰伯維
- 18. 錯誤-swift-泰伯維-custome細胞
- 19. 問題在CGRectMake爲泰伯維在AlertView
- 20. Addint的TextView到泰伯維動態
- 21. 使用自定義泰伯維節頭
- 22. 泰伯維[cell.contentview viewwithtag:]被返回nil
- 23. 一個tabBarController與NavigationController和泰伯維
- 24. 插入的CollectionView到泰伯維細胞
- 25. 如何當我們點擊泰伯維
- 26. 無段沒有在泰伯維
- 27. 泰伯維創建程序是空
- 28. 發行對象爲泰伯維
- 29. 從PLIST(字典),以泰伯維
- 30. 使用泰伯維顯示與childByAutoId
我假設你正在談論TableLayout? – 2011-03-06 08:58:33