Code example for TableRow

Methods: addView, setPadding

0
		return tv;
	} 
 
	/** Laver en TableRow */ 
	private TableRow tr(View knap1, View knap2) {
		TableRow tr = new TableRow(this);
		tr.setPadding(5, 2, 5, 2);
		tr.addView(knap1);
		//knap1.getLayoutParams().width = ViewGroup.LayoutParams.WRAP_CONTENT; 
		tr.addView(knap2);
		return tr;
	} 
 
	private static OnTouchListener farvKnapNårDenErTrykketNed = new OnTouchListener() {
		public boolean onTouch(View view, MotionEvent me) { 
			Log.d("onTouch()", me.toString()); 
			ImageView ib = (ImageView) view; 
			if (me.getAction() == MotionEvent.ACTION_DOWN) { 
				//log("farve "+me); 
				ib.setColorFilter(0xFFA0A0A0, PorterDuff.Mode.MULTIPLY); 
			} else if (me.getAction() == MotionEvent.ACTION_MOVE) {