Code example for TableRow

Methods: addView

0
		private TextView txvFrom;
		private TextView txvMessage;
 
		public SimpleMessageView(Context context, String message, Date timestamp, int monitorID, boolean isOutgoing) {
			super(context);
			mHeaderRow = new TableRow(context);
 
			txvDate = new TextView(context);
			txvDate.setTextSize(16);
			txvDate.setPadding(3, 3, 3, 3);
			txvDate.setGravity(Gravity.LEFT);
			txvFrom = new TextView(context);
			txvFrom.setTextSize(16);
			txvFrom.setPadding(3, 3, 8, 3);
			txvFrom.setGravity(Gravity.RIGHT);
 
			// this.addView(txvHeader, new 
			// LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, 
			// LayoutParams.WRAP_CONTENT)); 
			mHeaderRow.addView(txvDate);
			mHeaderRow.addView(txvFrom);
			addView(mHeaderRow);
 
			txvMessage = new TextView(context);
			txvMessage.setTextSize(12);
			txvMessage.setPadding(8, 2, 8, 2);