1 2 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 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
ScrollView myview = new ScrollView(this);
LinearLayout layout = new LinearLayout(this); // instancie un linearLayout
layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
layout.setOrientation(LinearLayout.VERTICAL);
layout.setGravity(Gravity.CENTER);
TextView title = new TextView(this);
title.setText("Noter cette intervention : "+intervention.getMatiere());
final EditText nom = new EditText(this);
nom.setText("Votre nom");
final EditText commentaire = new EditText(this);
commentaire.setText("Entré votre commentaire");
/******* NOTE COMPETENCE *************************************************************************/
LinearLayout noteCompetence = new LinearLayout(this);
noteCompetence.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
noteCompetence.setOrientation(LinearLayout.VERTICAL);
noteCompetence.setGravity(Gravity.CENTER);
TextView titleNoteCompetence = new TextView(this);
titleNoteCompetence.setText("Noter la compétence : ");
final RatingBar competence = new RatingBar(this);
competence.setContentDescription("Note la compétence de l'intervenant");
noteCompetence.addView(titleNoteCompetence);
noteCompetence.addView(competence);
/***************************************************************************************************/
/******* NOTE Connaissance *************************************************************************/
LinearLayout noteConnaissance = new LinearLayout(this);
noteConnaissance.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
noteConnaissance.setOrientation(LinearLayout.VERTICAL);
noteConnaissance.setGravity(Gravity.CENTER);
TextView titleNoteConnaissance = new TextView(this);
titleNoteConnaissance.setText("Noter la connaissance : ");
final RatingBar connaissance = new RatingBar(this);
connaissance.setContentDescription("Note la connaissance de l'intervenant");
noteCompetence.addView(titleNoteConnaissance);
noteCompetence.addView(connaissance);
/***************************************************************************************************/
/******* NOTE Contenu *************************************************************************/
LinearLayout noteContenu = new LinearLayout(this);
noteContenu.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
noteContenu.setOrientation(LinearLayout.VERTICAL);
noteContenu.setGravity(Gravity.CENTER);
TextView titleNoteContenu = new TextView(this);
titleNoteContenu.setText("Noter le contenu : ");
final RatingBar contenu = new RatingBar(this);
contenu.setContentDescription("Note le contenu ");
noteCompetence.addView(titleNoteContenu);
noteCompetence.addView(contenu);
/***************************************************************************************************/
/******* NOTE Exemple *************************************************************************/
LinearLayout noteExemple = new LinearLayout(this);
noteExemple.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
noteExemple.setOrientation(LinearLayout.VERTICAL);
noteExemple.setGravity(Gravity.CENTER);
TextView titleNoteExemple = new TextView(this);
titleNoteExemple.setText("Noter les exemples : ");
final RatingBar exemple = new RatingBar(this);
exemple.setContentDescription("Note le contenu ");
noteExemple.addView(titleNoteExemple);
noteExemple.addView(exemple);
/***************************************************************************************************/
/******* NOTE Reponse *************************************************************************/
LinearLayout noteReponse = new LinearLayout(this);
noteReponse.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
noteReponse.setOrientation(LinearLayout.VERTICAL);
noteReponse.setGravity(Gravity.CENTER);
TextView titleNoteReponse = new TextView(this);
titleNoteExemple.setText("Noter les réponses : ");
final RatingBar reponse = new RatingBar(this);
noteExemple.addView(titleNoteReponse);
noteExemple.addView(reponse);
/***************************************************************************************************/
/******* NOTE Slide *************************************************************************/
LinearLayout noteSlide = new LinearLayout(this);
noteSlide.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
noteSlide.setOrientation(LinearLayout.VERTICAL);
noteSlide.setGravity(Gravity.CENTER);
TextView titleNoteSlide = new TextView(this);
titleNoteExemple.setText("Noter les slides : ");
final RatingBar slide = new RatingBar(this);
noteExemple.addView(titleNoteSlide);
noteExemple.addView(slide);
/***************************************************************************************************/
layout.setScrollbarFadingEnabled(true);
layout.addView(title);
layout.addView(nom);
layout.addView(commentaire);
layout.addView(noteCompetence);
layout.addView(noteConnaissance);
layout.addView(noteExemple);
layout.addView(noteReponse);
layout.addView(noteSlide);
myview.addView(layout); |