Proyectos de Subversion Android Microlearning

Rev

Rev 4 | Rev 7 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 4 Rev 5
Línea 43... Línea 43...
43
    // binds the data to the TextView in each row
43
    // binds the data to the TextView in each row
44
    @Override
44
    @Override
45
    public void onBindViewHolder(ViewHolder holder, int position) {
45
    public void onBindViewHolder(ViewHolder holder, int position) {
46
        Answer mAnswer = mAnswers.get(position);
46
        Answer mAnswer = mAnswers.get(position);
Línea 47... Línea -...
47
 
-
 
48
        Log.e("Aqui",""+mAnswer.getText());
-
 
49
        String contenido;
-
 
50
        contenido=mAnswer.getText();
-
 
51
 
47
 
Línea 52... Línea 48...
52
        holder.mText.setText("" + Html.fromHtml(contenido, Html.FROM_HTML_MODE_COMPACT));
48
        holder.mText.setText(Html.fromHtml(mAnswer.getText(), Html.FROM_HTML_MODE_COMPACT));
53
 
49
 
Línea 54... Línea 50...
54
        holder.mRadioButton.setChecked(position == selected);
50
        holder.mRadioButton.setChecked(position == selected);
Línea 68... Línea 64...
68
        RadioButton mRadioButton;
64
        RadioButton mRadioButton;
Línea 69... Línea 65...
69
 
65
 
70
        ViewHolder(View itemView) {
66
        ViewHolder(View itemView) {
71
            super(itemView);
67
            super(itemView);
72
            mText = itemView.findViewById(R.id.textView3);
68
            mText = itemView.findViewById(R.id.textView3);
73
            mRadioButton = (RadioButton) itemView.findViewById(R.id.fragment_quiz_single_answer_item_radio);
69
            mRadioButton = itemView.findViewById(R.id.fragment_quiz_single_answer_item_radio);
74
            mRadioButton.setOnClickListener(new View.OnClickListener() {
70
            mRadioButton.setOnClickListener(new View.OnClickListener() {
75
                @Override
71
                @Override
76
                public void onClick(View view) {
72
                public void onClick(View view) {
77
                    selected = getAdapterPosition();
73
                    selected = getBindingAdapterPosition();
Línea 78... Línea 74...
78
                    Answer answer = mAnswers.get(selected);
74
                    Answer answer = mAnswers.get(selected);
79
 
75
 
80
                    int position = -1;
76
                    int position = -1;