unknown error using LayoutParams of android
i've been trying to ensure 2 columns of buttons that are created are of the same height but of no hope.

i tried using the LayoutParams but when i run, the display became blank. There are no error but it display nothing.

*note the text of by button are from a database

my code:

    ViewGroup.LayoutParams btnSize = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT);
		btnSize.height = 50;
		btnSize.width = 50;

		//add table row per title
		for(i=0;i<aList.size();i++)
        {
        	// ================== normal ================= //
			//create table row
        	TableRow trN = new TableRow(this);
        	trN.setId(1000+i);
        	trN.setLayoutParams(new LayoutParams (LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT));
        	
        	//add data to table row
        	Button btA = new Button (this);
        	btA.setId(2000+i);
        	btA.setText(aList.get(i).toString());
        	btA.setTextSize(15);
        	btA.setTextColor(Color.BLACK);
        	btA.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
        	btA.setOnClickListener(this);
        	btA.setSingleLine(false);
        	btA.setHorizontallyScrolling(false);
        	btA.setLayoutParams(btnSize);
        	
        	Button btB = new Button (this);
        	btB.setId(3000+i);
        	btB.setText(bList.get(i).toString());
        	btB.setTextSize(15);
        	btB.setTextColor(Color.BLACK);
        	btB.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
        	btB.setOnClickListener(this);
        	btB.setSingleLine(false);
        	btB.setHorizontallyScrolling(false);
        	btA.setLayoutParams(btnSize);
        	
        	trN.addView(btA);
        	trN.addView(btB);
        	
        	tableConv.addView(trN);
        }//for
unknown error using LayoutParams of android
===

i've been trying to ensure 2 columns of buttons that are created are of the same height but of no hope.

i tried using the LayoutParams but when i run, the display became blank. There are no error but it display nothing.

*note the text of by button are from a database

my code:

    ViewGroup.LayoutParams btnSize = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT);
		btnSize.height = 50;
		btnSize.width = 50;

		//add table row per title
		for(i=0;i<aList.size();i++)
        {
        	// ================== normal ================= //
			//create table row
        	TableRow trN = new TableRow(this);
        	trN.setId(1000+i);
        	trN.setLayoutParams(new LayoutParams (LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT));
        	
        	//add data to table row
        	Button btA = new Button (this);
        	btA.setId(2000+i);
        	btA.setText(aList.get(i).toString());
        	btA.setTextSize(15);
        	btA.setTextColor(Color.BLACK);
        	btA.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
        	btA.setOnClickListener(this);
        	btA.setSingleLine(false);
        	btA.setHorizontallyScrolling(false);
        	btA.setLayoutParams(btnSize);
        	
        	Button btB = new Button (this);
        	btB.setId(3000+i);
        	btB.setText(bList.get(i).toString());
        	btB.setTextSize(15);
        	btB.setTextColor(Color.BLACK);
        	btB.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
        	btB.setOnClickListener(this);
        	btB.setSingleLine(false);
        	btB.setHorizontallyScrolling(false);
        	btA.setLayoutParams(btnSize);
        	
        	trN.addView(btA);
        	trN.addView(btB);
        	
        	tableConv.addView(trN);
        }//for