0
我有一個名爲「網格」表,創建自己的類裏......這樣的:插入TableLayout與RelativeLayout的內部滾動條
ScrollView contentView = new ScrollView(this);
contentView.setBackgroundColor(Color.LTGRAY);
// THIS IS OUR MAIN LAYOUT
mainLayout = new RelativeLayout(this);
// ADD MAINLAYOUT TO SCROLLVIEW (contentView)
contentView.addView(mainLayout);
// SET CONTENT VIEW
setContentView(contentView);
meTable = this.tableLayout();
HorizontalScrollView HOR = new HorizontalScrollView(this);
mainLayout.addView(HOR);
HOR.addView(meTable);
這將創建表,並且還增加了水平和垂直滾動條,太好了......
不過,我需要把所有的這另一個RelativeLayout的裏面,像這樣:
I C在這樣做,但沒有滾動條,我只需要添加「meTable」,像這樣:
Grid gr = new Grid();
gr.Activate(this);
TableLayout tablita;
RelativeLayout layout = (RelativeLayout) findViewById(R.id.contenedorLay);
tablita = gr.meTable;
layout.addView(tablita);
如何與他們的滾動條添加整個表?
誰知道你的爸爸? – WhiteFloater