| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 
 |  
private void ConstructionVueIntervention(long idIntervention,String intervenant){
 
	 	LinearLayout linearLayoutUp = new LinearLayout(this);
	 	linearLayoutUp.setBackgroundColor(Color.WHITE);
 
	 	linearLayoutUp.setOrientation(0);
 
	 	LayoutParams params = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
	 	//params.setMargins(0, 20, 0, 0);
	 	linearLayoutUp.setLayoutParams(params);
	 	linearLayoutUp.setGravity(Gravity.CENTER);
	 	linearLayoutUp.setTag("layoutup"+idIntervention);
 
 
	 		Calendar instance = Calendar.getInstance();
	 		instance.setTimeInMillis(idIntervention);
 
	 		LinearLayout linearLayoutDateText= new LinearLayout(this);
	 		linearLayoutDateText.setOrientation(1);
	 		linearLayoutDateText.setLayoutParams(new LayoutParams(3*getWindowManager().getDefaultDisplay().getWidth()/4,LayoutParams.WRAP_CONTENT));
	 		linearLayoutDateText.setGravity(Gravity.CENTER);
 
 
	 	 LinearLayout linearLayoutDate = new LinearLayout(this);
	 	 linearLayoutDate.setOrientation(0);
	 	 linearLayoutDate.setLayoutParams(new LayoutParams(3*getWindowManager().getDefaultDisplay().getWidth()/4,LayoutParams.WRAP_CONTENT));
	 	 linearLayoutDate.setGravity(Gravity.CENTER);
 
 	 	  TextView dateViewTemp = new TextView(this);
		  dateViewTemp.setText(instance.get(Calendar.DAY_OF_MONTH)+"/"+instance.get(Calendar.MONTH)+"/"+instance.get(Calendar.YEAR));
		  dateViewTemp.setGravity(Gravity.CENTER);
		  dateViewTemp.setTextColor(Color.CYAN);
		  dateViewTemp.setTextSize(20);
		  dateViewTemp.setPadding(0, 10, 0, 0);
		  linearLayoutDate.addView(dateViewTemp);
 
 
 
		  LinearLayout linearLayoutText = new LinearLayout(this);
		 	 linearLayoutText.setOrientation(0);
		 	 linearLayoutText.setLayoutParams(new LayoutParams(3*getWindowManager().getDefaultDisplay().getWidth()/4,LayoutParams.WRAP_CONTENT));
		 	 linearLayoutText.setGravity(Gravity.CENTER);
 
	 	 	  TextView textViewTemp = new TextView(this);
			  textViewTemp.setText(intervenant);
			  textViewTemp.setGravity(Gravity.CENTER);
			  textViewTemp.setTextColor(Color.CYAN);
			  textViewTemp.setTextSize(17);
			  textViewTemp.setPadding(0, 0, 0, 10);
			  linearLayoutText.addView(textViewTemp);
 
			  linearLayoutDateText.addView(linearLayoutDate);
			   linearLayoutDateText.addView(linearLayoutText);
			  linearLayoutUp.addView(linearLayoutDateText);
 
 
			  LinearLayout linearLayoutImg = new LinearLayout(this);
			  linearLayoutImg.setOrientation(0);
			  linearLayoutImg.setLayoutParams(new LayoutParams(getWindowManager().getDefaultDisplay().getWidth()/4,LayoutParams.WRAP_CONTENT));
			  linearLayoutImg.setGravity(Gravity.CENTER);
 
			  ImageButton imageButtonTemp = new ImageButton(this);
			  imageButtonTemp.setImageResource(R.drawable.extend);
			  imageButtonTemp.setTag(R.string.tag_description,"bouton"+idIntervention);
			  imageButtonTemp.setTag(R.string.tag_id, idIntervention);
			  imageButtonTemp.setOnClickListener(this);
			  linearLayoutImg.addView(imageButtonTemp);
			  linearLayoutUp.addView(linearLayoutImg);
 
 
			  LinearLayout linearLayoutDown = new LinearLayout(this);
			  linearLayoutDown.setBackgroundColor(Color.WHITE);
			  linearLayoutDown.setOrientation(0);
			  linearLayoutDown.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
			  linearLayoutUp.setGravity(Gravity.CENTER);
			  linearLayoutDown.setTag("layoutdown"+idIntervention);
			  linearLayoutDown.setVisibility(View.INVISIBLE);
			  linearLayoutDown.setGravity(Gravity.CENTER);
 
			  layoutParent.addView(linearLayoutUp);
			  layoutParent.addView(linearLayoutDown);
	 } | 
Partager